help iam have command no work
#1

iam have command no work name /aduty and /ta pls help

this cod off /aduty
Quote:

new AdminDutyStatus;
new bool:IsOnAdminDuty[MAX_PLAYERS] = false;
CMD:aduty(playerid,params[]) // Onduty
{
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,-1,"You are not authorised to use that command.");
return 1;
}
if(IsOnAdminDuty[playerid] == false)
{
IsOnAdminDuty[playerid] = true;
new pname[24],dstring[124];
GetPlayerName(playerid,pname,sizeof(pname));
format(dstring,sizeof(dstring),"Administrator %s is now on duty.",pname);
SendClientMessageToAll(-1,dstring);
SetPlayerHealth(playerid,99999);
SetPlayerArmour(playerid,99999);
SetPlayerSkin(playerid,271);
}
return 1;
}
CMD:aoffduty(playerid,params[]) // Off duty
{
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,-1,"You are not authorised to use that command.");
return 1;
}
if(IsOnAdminDuty[playerid] == true)
{
IsOnAdminDuty[playerid] = false;
new name[24],ostring[124];
GetPlayerName(playerid,name,sizeof(name));
format(ostring,sizeof(ostring),"Administrator %s is now off duty.",name);
SendClientMessageToAll(-1,ostring);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,0);
}
return 1;
}
CMD:admins(playerid,params[]) // Admins command
{
SendClientMessage(playerid,-1,"----Current on duty Administrators----");
for(new i = 0; i <MAX_PLAYERS; i++)
{
if(IsOnAdminDuty[i] == true)
{
new aname[24],astring[124];
GetPlayerName(playerid,aname,sizeof(aname));
format(astring,sizeof(astring),"%s",aname);
SendClientMessage(playerid,-1,astring);
}
}
return 1;

and that for command /ta

Quote:

COMMAND:ta(playerid,params[])
{
new playerid2;
if(sscanf(params,"u",playerid2)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/ta [ID]");
new Float,Float:y,FLoat:z;
GetPlayerPos(playerid2,x,y,z);
if(!IsPlayerInRangeOfPoint(playerid,5.0,x,y,z)) return SendClientMessage(playerid,COLOR_RED,"Player isn't close enough!");
else
{
TogglePlayerControllable(playerid2,0);
SendClientMessage(playerid,COLOR_BLUE,"Player tazed!");
SendClientMessage(playerid2,COLOR_RED,"You have been tazed!");
}
return 1;

pls help
Reply
#2

help help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)