problem in command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: problem in command (
/showthread.php?tid=272580)
problem in command -
marik1599 - 29.07.2011
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(ru, playerid, params[ ])
{
new id;
if ( AdminLevel[ playerid ] != 1337 )
return SendClientMessage( playerid, Red, "Invalid Command" );
if ( sscanf( params, "u", id ) )
return SendClientMessage( playerid, Red, "Usage: /ru [playerid/PartOfName]" );
SendClientMessage( id,Lime, "You have been forced to Russia team by a Server Admin.");
Setteam(playerid, 0);
return 1;
}
Re: problem in command -
Famalamalam - 29.07.2011
Re: problem in command -
marik1599 - 29.07.2011
this forward that i create ..
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
Re: problem in command -
Famalamalam - 29.07.2011
No ... you were setting it to your own ID.
It SHOULD be:
Since "id" is what you enter in the command.
Re: problem in command -
marik1599 - 29.07.2011
yeaaaaaaaaaaaa tnx man !!!!!
you very help me !!
Re: problem in command -
Famalamalam - 29.07.2011
Lol, I'm glad.