if(!strcmp(cmdtext, "/aduty", true)) { if(!IsPlayerAdmin(playerid)); { SetPlayerColor(playerid, COLOR_BBLUE) SetPlayerChatBubble(playerid, "Administrator Dont Attack", 0xFF0000FF, 100.0, 10000); SetPlayerHealth(playerid, 9999999); SetPlayerArmour(playerid, 9999999); return 1; } }
C:\Documents and Settings\Holly-\Desktop\NighGame\gamemodes\NightGame.pwn(32462) : error 036: empty statement C:\Documents and Settings\Holly-\Desktop\NighGame\gamemodes\NightGame.pwn(32465) : error 001: expected token: ";", but found "-identifier-" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
if(!strcmp(cmdtext, "/aduty", true))
{
if(IsPlayerAdmin(playerid))//Actually here you made !IsPlayerAdmin , that's mean if the player not admin..
{
SetPlayerColor(playerid, COLOR_BBLUE);//also here missing ';'
SetPlayerChatBubble(playerid, "Administrator Dont Attack", 0xFF0000FF, 100.0, 10000);
SetPlayerHealth(playerid, 9999999);
SetPlayerArmour(playerid, 9999999);
return 1;
}//And finally here you forgot to close the bracket.
return 0;
}
if(!strcmp(cmdtext, "/aduty", true, 3))
return 1; } return 0; }
bro i thinks its working i got no error no warning .. but wit this any1 cant kill me . ?
and i want that whe ni type this send messege to all that im on admin duty .. or if any admin type send all to he is on admin duty thanks you |
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/aduty", true))
{
if(IsPlayerAdmin(playerid))//Actually here you made !IsPlayerAdmin , that's mean if the player not admin..
{
new
name[MAX_PLAYER_NAME],string[64];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"Adminstrator %s has turned his duty on.",name);
SendClientMessageToAll(COLOR_BBLUE,string);
SetPlayerColor(playerid, COLOR_BBLUE);//also here missing ';'
SetPlayerChatBubble(playerid, "Administrator Dont Attack", 0xFF0000FF, 100.0, 10000);
SetPlayerHealth(playerid, 9999999);
SetPlayerArmour(playerid, 9999999);
return 1;
}//And finally here you forgot to close the bracket.
}
return 0;
}
CMD:test(playerid,params[])
{
SendClientMessage(playerid,-1,"Testing");
return 1;
}
if(!strcmp(cmdtext, "/aduty", true)) { if(IsPlayerAdmin(playerid))//Actually here you made !IsPlayerAdmin , that's mean if the player not admin.. { new name[MAX_PLAYER_NAME],string[64]; GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"Adminstrator %s has turned his duty on.",name); SendClientMessageToAll(COLOR_BBLUE,string); SetPlayerColor(playerid, COLOR_BBLUE);//also here missing ';' SetPlayerChatBubble(playerid, "Administrator Dont Attack", 0xFF0000FF, 100.0, 10000); SetPlayerHealth(playerid, 9999999); SetPlayerArmour(playerid, 9999999); return 1; }//And finally here you forgot to close the bracket. } return 0; }
No, it is normal, he just added set hp and armor to 999999 so you won't be killed. And yeah, nobody will laugh lol, this is called scripting help with reason. So just copy paste this command.
|
if(IsPlayerAdmin(playerid))//Actually here you made !IsPlayerAdmin , that's mean if the player not admin..
{
new
name[MAX_PLAYER_NAME],string[64];
GetPlayerName(playerid,name,sizeof(name));
if(IsPlayerAdmin(playerid))//Actually here you made !IsPlayerAdmin , that's mean if the player not admin..
{
new name[MAX_PLAYER_NAME],string[64];
GetPlayerName(playerid,name,sizeof(name));