why my /bk dont work - 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: why my /bk dont work (
/showthread.php?tid=89620)
why my /bk dont work -
Geekzor - 03.08.2009
here is my /bk command for cal lbackup - cops but when i type it in server it say SERVER : Unknown Command
Код:
if(strcmp(cmdtext, "/bk", true) == 0)
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerTeam(i) == TEAM_COP)
{
new name[255];
GetPlayerName(playerid, name, 255);
new string[256];
format(string,256,"Officier %s need Backup, Now! He is Marked Purple on the map!",name);
SendClientMessageToAll(COLOR_BLUE,string);
SetPlayerColor(playerid,0x800080AA);
SetTimer("ChangeColor",30000,0);
}
}
}
Re: why my /bk dont work -
James_Alex - 03.08.2009
cuz you forgot the return 1;
try
pawn Код:
if(strcmp(cmdtext, "/bk", true) == 0)
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerTeam(i) == TEAM_COP)
{
new name[255];
GetPlayerName(playerid, name, 255);
new string[256];
format(string,256,"Officier %s need Backup, Now! He is Marked Purple on the map!",name);
SendClientMessageToAll(COLOR_BLUE,string);
SetPlayerColor(playerid,0x800080AA);
SetTimer("ChangeColor",30000,0);
}
}
return 1;
}