23.07.2010, 17:03
Hi,if anyone could create a filterscript on which admin can be on and off duty,i need it for my server as quickly as possible,my server is running on 0.2x
//Top of script new AdminDuty[MAX_PLAYERS]; //OnPlayerConnect AdminDuty[playerid] = 0; //OnPlayerCommand if(strcmp(cmdtext,"/adminduty",true) == 0) { if(IsPlayerAdmin(playerid)) { if(AdminDuty[playerid] == 0) { AdminDuty[playerid] = 1; SetPlayerColor(playerid,CUSTOM_COLOR); return 1; } else { AdminDuty[playerid] = 0; SetPlayerColour(playerid,DEFAULT_COLOUR); return 1; } } else { SendClientMessage(playerid,COLOUR_WARNING,"You are not an administrator!"); return 1; } }
Please show us your errors. Also the lines where the compiler says the errors are.
|
if(strcmp("/adminduty",cmdtext,true) == 0 ) OnPlayerConnect AdminDuty[playerid]= 1 if(IsPlayerAdmin(playerid)) if(AdminDuty[playerid]) == 1) AdminDuty[Playerid] == 1 Setplayercolor(playerid,COLOR_YOU_WANT); done , if you got any problem i will repair |