Moving Doors/gates. - 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)
+--- Thread: Moving Doors/gates. (
/showthread.php?tid=327537)
Moving Doors/gates. -
BetaLaxx - 21.03.2012
I have a command below to open a unity barrier.
Only taxi drivers can use this command.
The problem i'm seeing is, Only first 3 players can use this command, For rest it shows "SERVER: Unknown Command"
If there is any problem in the command, Please fix it and reply below the topic, thanks!
pawn Код:
if(strcmp(cmd, "/utgate", true) == 0)
{
sendername = NewPlayerName(playerid);
GetPlayerSex(playerid);
if(PlayerInfo[playerid][pJob] == 4)
{
if(IsPlayerInRangeOfPoint(playerid, 15, 1814.8854,-1890.8146,13.4141))
{
SetTimer("UnityGateClose", 12000, 0);
ApplyAnimation(playerid,"COP_AMBIENT","Coplook_watch",4.1,0,false,false,false,1000);
MoveObject(utgate, 1811.646484375,-1894.8720703125, 13.600885391235, 1.5, 0.00000000,0.7449951171875,269.99450683594);
if(PlayerInfo[playerid][pUMask] == 0)
{
format(string, sizeof(string), "*%s presses a button on %s watch and opens the Unity Barrier.", sendername,Gender[playerid]);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(PlayerInfo[playerid][pUMask] == 1)
{
format(string, sizeof(string), "*Unknown presses a button on %s watch and opens the Unity Barrier.",Gender[playerid]);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
}
return 1;
}
Re: Moving Doors/gates. -
BetaLaxx - 21.03.2012
Anyone here who can help me with this?
Re: Moving Doors/gates. -
ReneG - 21.03.2012
Is
pawn Код:
cmd = strtok(cmdtext,idx);
in your OnPlayerCommandText? Outside of a if(strcmp of course.
Re: Moving Doors/gates. -
BetaLaxx - 21.03.2012
Quote:
Originally Posted by VincentDunn
Is
pawn Код:
cmd = strtok(cmdtext,idx);
in your OnPlayerCommandText? Outside of a if(strcmp of course.
|
What do you mean?
pawn Код:
cmd = strtok(cmdtext,idx);
It's under OnPlayerCommandText.
Re: Moving Doors/gates. -
BetaLaxx - 22.03.2012
Please, I really need help.