problem in command
#1

i create a command that admin can change a team to player.
the problem is that i can't use this command on players it's affect only me..
i mean that when i typing /ru (id) never mind the id that i put it will affect me
tnx for helping
PHP код:
command(ruplayeridparams[ ])
{
     new 
id;
     if ( 
AdminLevelplayerid ] != 1337 )
     return 
SendClientMessageplayeridRed"Invalid Command" );
     if ( 
sscanfparams"u"id ) )
     return 
SendClientMessageplayeridRed"Usage: /ru [playerid/PartOfName]" );
     
SendClientMessageid,Lime"You have been forced to Russia team by a Server Admin.");
     
Setteam(playerid0);
     return 
1;

Reply
#2

pawn Код:
Setteam(id, 0);
Reply
#3

this forward that i create ..
Quote:

Setteam(id, 0);

and it means
Quote:

if(teamid == 0)
{
gTeam[playerid] = Axis;
SetPlayerSkin(playerid, 287);
SetPlayerPos(playerid,2418.2493,110.7310,27.1995);
SetCameraBehindPlayer(playerid);
SetPlayerColor(playerid, Red);
SendClientMessage(playerid, Red, "******Russian POWERS******");
SendClientMessage(playerid, Red, "Welcome Back to base");
SendClientMessage(playerid, Red, "Please follow all Server Rules.");
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Which Type of Soldier?", "Soldier \n Medic \n Mechanic", "Done", "Close");
}

the command working at me so i dont think it's problem in the forward .
but i need that the command will affect a id of player
Reply
#4

No ... you were setting it to your own ID.

pawn Код:
Setteam(playerid, 0);
It SHOULD be:

pawn Код:
Setteam(id, 0);
Since "id" is what you enter in the command.
Reply
#5

yeaaaaaaaaaaaa tnx man !!!!!
you very help me !!
Reply
#6

Lol, I'm glad.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)