How to slap ?
#10

Use my code.

PHP код:
CMD:slap(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] >= || PlayerInfo[playerid][pModerator] >= 1)
    {
        if(
AdminDuty[playerid] != && PlayerInfo[playerid][pAdmin] < 5)
        {
            
SendClientMessage(playerid,COLOR_WHITE"You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
            return 
1;
        }
        new 
string[128], giveplayerid;
        if(
sscanf(params"u"giveplayerid)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /slap [playerid/partofname]");
        if(
PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
        {
            
SendClientMessage(playerid,COLOR_WHITE"You can't slap a higher admin.");
            return 
1;
        }
        new
            
Float:shealth;
        if(
IsPlayerConnected(giveplayerid)) {
            
GetPlayerHealth(giveplayeridshealth);
            
SetPlayerHealth(giveplayeridshealth-5);
            
GetPlayerPos(giveplayeridPlayerInfo[giveplayerid][pPos_x], PlayerInfo[giveplayerid][pPos_y], PlayerInfo[giveplayerid][pPos_z]);
            
SetPlayerPos(giveplayeridPlayerInfo[giveplayerid][pPos_x], PlayerInfo[giveplayerid][pPos_y], PlayerInfo[giveplayerid][pPos_z]+5);
            
PlayerPlaySound(giveplayerid1130PlayerInfo[giveplayerid][pPos_x], PlayerInfo[giveplayerid][pPos_y], PlayerInfo[giveplayerid][pPos_z]+5);
            
format(stringsizeof(string), "AdmCmd: %s was slapped by %s",GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
            
ABroadCast(COLOR_LIGHTRED,string,2);
        }
    }
    else
    {
        
SendClientMessage(playeridCOLOR_GRAD1"You're not authorized to use that command!");
    }
    return 
1;

Please REP+1 me.
Reply


Messages In This Thread
How to slap ? - by Glossy42O - 20.07.2015, 13:31
Re: How to slap ? - by DaniceMcHarley - 20.07.2015, 13:33
Re: How to slap ? - by SoFahim - 20.07.2015, 13:33
Re: How to slap ? - by Jstylezzz - 20.07.2015, 13:33
Re: How to slap ? - by FreddiewJO - 20.07.2015, 13:36
Re: How to slap ? - by Crystallize - 20.07.2015, 14:23
Re: How to slap ? - by suni - 24.07.2015, 19:46
Re: How to slap ? - by Skillex333 - 24.07.2015, 19:54
Re: How to slap ? - by TenTen - 24.07.2015, 21:49
Re: How to slap ? - by XBrianX - 24.07.2015, 23:46

Forum Jump:


Users browsing this thread: 3 Guest(s)