AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   public needsub(id) [SOLVED] (https://forums.alliedmods.net/showthread.php?t=117726)

ProIcons 02-04-2010 03:24

public needsub(id) [SOLVED]
 
PHP Code:

public needsub(id)
{
    new 
admin[32],map[32],cmd[300]
    
get_mapname (map,31)
    
copy(cmd,299,"");
    
get_cvar_string("admin",admin,31)
    new 
team1 get_cvar_num("Team1-Wins")
    new 
team2 get_cvar_num("Team2-Wins")
    new 
half get_cvar_num("half")
    
format(cmd,299,"NEEDSUB %s %s %s %s %s",map,team1,team2,admin,half)
    
client_print(0,print_chat,"[Gather] Format of CMD is %s",cmd);
    
socket_send(bothost,cmd,512)


I have this code and when i am pressing .needsub it appears on cleint_print:
Quote:

Originally Posted by Server
[Gather] Format of CMD is NEEDSUB de_inferno NEEDSUB de_inferno NEEDSUB de_inferno NEEDSUB de_inferno GaMeMaStEr

Why that?

ConnorMcLeod 02-04-2010 07:25

Re: public needsub(id) [SOLVED]
 
%s refers to a string, vars you pass are integers.
Also, you could format directly in client_print instead of using format( native.

ProIcons 02-04-2010 08:51

Re: public needsub(id) [SOLVED]
 
yeap yeap i sayed solved:P


All times are GMT -4. The time now is 07:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.