PROBLEM WITH CMD CAN FIX :s - 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 WITH CMD CAN FIX :s (
/showthread.php?tid=111356)
PROBLEM WITH CMD CAN FIX :s -
buonggiorno - 01.12.2009
Hi, i make this cmd that police, fbi and national guard can open gate at ls airport, but when somebody from that teams type /lso or /lsc he get message YOU ARE NOT COP!
Here is code, i try to fix it but i cant :S
Код:
if (strcmp(cmdtext, "/lso", true)==0)
{
if(PlayerInfo[playerid][pTeam] == 1 || PlayerInfo[playerid][pTeam] == 2 || PlayerInfo[playerid][pTeam] == 3)
{
MoveObject(lsgate,1950.097,-2189.796,15.320, 8.0);
SendClientMessage(playerid, COLOR_GREEN, "GATE OPEN.");
}
else return SendClientMessage(playerid, COLOR_GREEN, "YOU ARE NOT PD.");
}
if (strcmp(cmdtext, "/lsc", true)==0)
{
if(PlayerInfo[playerid][pTeam] == 1 || PlayerInfo[playerid][pTeam] == 2 || PlayerInfo[playerid][pTeam] == 3)
{
MoveObject(lsgate,1961.690,-2189.593,15.320, 8.0);
SendClientMessage(playerid, COLOR_GREEN, "GATE CLOSE.");
}
else return SendClientMessage(playerid, COLOR_GREEN, "YOU ARE NOT PD.");
}
help to fix this please
Re: PROBLEM WITH CMD CAN FIX :s -
DeathOnaStick - 01.12.2009
The part itself is okay (in my opinion), but i guess the
pawn Код:
PlayerInfo[playerid][pTeam]
causes the problems. Be sure to declare everything correctly.
Re: PROBLEM WITH CMD CAN FIX :s -
buonggiorno - 01.12.2009
hmmmm so what to write on that place?