public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
}
public OnPlayerCommandReceived(playerid, cmdtext[])
{
}
CMD:Slap(playerid,params[])
{
new id;
if(sscanf(params,"u",id)) return Msg(playerid,1,"Usage: /slap [id] ");
else if(!IsPlayerConnected(id)) return Msg(playerid,0,"Player Not FOund");
SetPlayerHealth(id,0.0);
PlayerPlaySound(1149,0,0,0,0);
return 1;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(!success) return SendClientMessage(playerid,0xFFFF00FF,"Unknown command"); return 1; }
CMD:Slap(playerid,params[]) { new id; if(!sscanf(params,"u",id)) { if(IsPlayerConnected(id)) { SetPlayerHealth(id,0.0); PlayerPlaySound(id,1149,0,0,0); } else return Msg(playerid,0,"Player Not FOund"); } else return Msg(playerid,1,"Usage: /slap [id] "); return 1; }
And I'd change the command to:
Код:
CMD:Slap(playerid,params[]) { new id; if(!sscanf(params,"u",id)) { if(IsPlayerConnected(id)) { SetPlayerHealth(id,0.0); PlayerPlaySound(id,1149,0,0,0); } else return Msg(playerid,0,"Player Not FOund"); } else return Msg(playerid,1,"Usage: /slap [id] "); return 1; } |
Yyy?
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(!success) return SendClientMessage(playerid,0xFFFF00FF,"Unknown command"); return 1; } And I'd change the command to: Код:
CMD:Slap(playerid,params[]) { new id; if(!sscanf(params,"u",id)) { if(IsPlayerConnected(id)) { SetPlayerHealth(id,0.0); PlayerPlaySound(id,1149,0,0,0); } else return Msg(playerid,0,"Player Not FOund"); } else return Msg(playerid,1,"Usage: /slap [id] "); return 1; } |
CMD:Slap(playerid,params[])
{
new id;
if(sscanf(params,"u",id)) return Msg(playerid,1,"Usage: /slap [id] ");
if(!IsPlayerConnected(id)) return Msg(playerid,0,"Player Not FOund");
SetPlayerHealth(id,0.0);
PlayerPlaySound(1149,0,0,0,0);
return 1;
}