Hopeless with this script help me please .
#1

I tired to allow this command only after a check if the player is an Admin, but it doesn't work, I can use it without being an Admin, plus if ID is wrong it doesn't show anything.

PHP код:
CMD:slap(playeridparams[])
{
 if (
IsPlayerAdmin(playerid))
    
 
SendClientMessage(playerid0xFF4646FF"You are not authorized to use that command !");
    new 
otherId;
  if(
sscanf(params"u"otherId)) return SendClientMessage(playerid0xFF4646FF"USAGE: /slap [ID/PartOfname]");
    if(
otherId != INVALID_PLAYER_ID)
    {
    new 
message[40];
              new 
Float:slxFloat:slyFloat:slz;
        
GetPlayerPos(otherIdslxslyslz);
        
SetPlayerPos(otherIdslxslyslz+5);
        
PlayerPlaySound(otherId1130slxslyslz+5);
format(messagesizeof(message), "(( You have been slapped by admin ! ))");
            
SendClientMessage(playerid0xFFFFFFAAmessage);
          }
       
    return 
1;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)