problem with gates need fast help - 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: problem with gates need fast help (
/showthread.php?tid=580437)
problem with gates need fast help -
Mijata - 05.07.2015
...,
Re: problem with gates need fast help -
Mijata - 05.07.2015
bump
AW: problem with gates need fast help -
Nero_3D - 05.07.2015
You should never get "Unknown Command" because you always return 1 therefore I think the command gets never called
Just put a print at the top of your command, that should be the basic layout
pawn Код:
CMD:opengate(playerid, params[])
{
SendClientMessage(playerid, -1, "/opengate");
if(gTeam[playerid] == THE_TEAM_THAT_CAN_OPEN_THE_GAME)
{
if(IsPlayerInRangeOfPoint(playerid,15.0,-726.69012, 970.46442, 14.01690))
{
MoveObject(Gate,-726.69012, 970.46442, 8.64090,3);
return true;
}
SendClientMessage(playerid, -1, "You are not near the gate");
}
return false; // "Unknown Command" for player who aren't in the correct team
}
Re: problem with gates need fast help -
nezo2001 - 05.07.2015
PHP код:
CMD:opengate(playerid, params[])
{
if(gTeam[playerid] == C1 || gTeam[playerid] == T1) return 0;
if(IsPlayerInRangeOfPoint(playerid,15.0,-726.69012, 970.46442, 14.01690))
{
MoveObject(Gate,-726.69012, 970.46442, 8.64090,3);
SendClientMessage(playerid,-1,"Gate is opened!");
}
else
{
SendClientMessage(playerid,-1,"You are not in base");
}
return 1;
}
CMD:closegate(playerid, params[])
{
if(gTeam[playerid] == C1 || gTeam[playerid] == T1) return 0;
if(IsPlayerInRangeOfPoint(playerid,15.0,-726.69012, 970.46442, 14.01690))
{
MoveObject(Gate,-726.69012, 970.46442, 14.01690,3);
SendClientMessage(playerid,-1,"Gate is closed!");
}
else
{
SendClientMessage(playerid,-1,"You are not in base");
}
return 1;
}
Re: problem with gates need fast help -
Mijata - 05.07.2015
thanks fixed and help me here :
https://sampforum.blast.hk/showthread.php?tid=580405