[HELP] Problem with a cmd - 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: [HELP] Problem with a cmd (
/showthread.php?tid=79866)
[HELP] Problem with a cmd -
FreddeN - 31.05.2009
I just got help with a cmd /pullover, and... well it works but when I choose my police team and types /pullover it says "You are not a Police Officer"...
I have maked every cop skin in team 9, it looks like this... one of the skins:
Код:
case 34:
{
GameTextForPlayer(playerid,"~n~~n~~n~~w~Police Officers",15000,3);
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1526.7371,-1677.8799,5.8906);
SetPlayerFacingAngle(playerid,271.5051);
SetPlayerCameraPos(playerid,1531.2161,-1677.8109,5.8906);
SetPlayerCameraLookAt(playerid,1526.7371,-1677.8799,5.8906);
SetPlayerColor(playerid,0x0000BBAA);
SetPlayerTeam(playerid,9);
ApplyAnimation(playerid,"PLAYIDLES","TIME",4.1,1,1,1,1,1);
}
}
And the /pullover cmd looks like:
Код:
if(!strcmp(cmdtext, "/pullover", true, 9))
{
if(GetPlayerTeam(playerid) != 9) return SendClientMessage(playerid, 0xFF0000AA, "You are not a Police Officer.");
new string[128];
new adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid,adminname,sizeof(adminname));
format(string, sizeof(string),"Officer %s says Pull Over Now!",adminname);
SendClientMessageToAll(0x0000BBAA, string);
return 1;
}
}
What is wrong?
Re: [HELP] Problem with a cmd -
FreddeN - 31.05.2009
Any ideas?
Re: [HELP] Problem with a cmd -
miokie - 31.05.2009
Use gTeam, I don't think SetPlayerteam works...
Re: [HELP] Problem with a cmd -
Mike Garber - 31.05.2009
pawn Код:
if(GetPlayerTeam(playerid) != 9) return SendClientMessage(playerid, 0xFF0000AA, "You are not a Police Officer.");
I am a real n00b but, For me it looks like, If player is in Team 9, it says that you are not a police officer..... I cant help you more xD