Admin On Duty command help
#1

im trying to script a /aod command Amin On Duty this is what i got
Quote:

dcmd_aod(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
{
if(AccInfo[playerid][God] == 0)
{
AccInfo[playerid][God] = 1;
SetPlayerHealth(playerid,100000);
GivePlayerWeapon(playerid,16,50000);
GivePlayerWeapon(playerid,38,50000);
SendClientMessage(playerid,green,"|- Admin On Duty -|");
SendClientMessageToAll(0x33CCFFAA," %s Is now a on duty Admin!");
SetPlayerColor(playerid,0x33CCFFAA);
return SendCommandToAdmins(playerid,"aod");
}
else
{
AccInfo[playerid][God] = 0;
SendClientMessage(playerid,red,"|- Admin Off Duty -|");
SendClientMessageToAll(0x33CCFFAA," %s Is now a off duty Admin");
SetPlayerColor(playerid,0xFFFFFFAA);
SetPlayerHealth(playerid, 100);
}
return GivePlayerWeapon(playerid,35,0);
}
else return ErrorMessages(playerid, 6);
}

it complies fine but when i get in game and test it the server crashes :/ i think its because of the sendclientmessage toall because im wanting to to say the players name witch is %s but server crahes IDK what i did wrong please help
Reply


Messages In This Thread
Admin On Duty command help - by darkknight123 - 12.01.2011, 14:12
Re: Admin On Duty command help - by Nonameman - 12.01.2011, 14:20
Re: Admin On Duty command help - by darkknight123 - 12.01.2011, 14:59

Forum Jump:


Users browsing this thread: 1 Guest(s)