Slap Command
#23

Under onplayercommandtext
PHP Code:
dcmd(slap4cmdtext); 
ANd this is the code!

Code:
dcmd_slap(playerid, params[])
{
    new id, string[126], Float: PPos[3];
    if(sscanf(params, "u", id))
        return SendClientMessage(playerid, -1, "SYNTAX: /slap [id]");
    
    GetPlayerPos(id, PPos[0], PPos[1], PPos[2]);
    SetPlayerPos(id, PPos[0], PPos[1], PPos[2]+4);
    
    format(string, sizeof(string), "You have slapped %s", GetName(id));
    SendClientMessage(playerid, -1, string);
    return 1;
}
And add this somewhere last!
PHP Code:
stock GetName(playerid)
{
    new 
Name[MAX_PLAYER_NAME];
    if(
IsPlayerConnected(playerid))
    {
        
GetPlayerName(playeridNamesizeof(Name));
    }
    return 
Name;

Salute Indian, i'm also indian!If worked , rep me bro!
Reply


Messages In This Thread
Slap Command - by Michael_Cruise - 13.06.2012, 09:44
Re: Slap Command - by JaKe Elite - 13.06.2012, 09:57
Re: Slap Command - by Sanady - 13.06.2012, 09:58
Re: Slap Command - by Vince - 13.06.2012, 10:00
Re: Slap Command - by milanosie - 13.06.2012, 10:04
Re: Slap Command - by Michael_Cruise - 13.06.2012, 10:13
Re: Slap Command - by Michael_Cruise - 13.06.2012, 10:27
Re: Slap Command - by JaKe Elite - 13.06.2012, 10:41
Re: Slap Command - by Nuke547 - 13.06.2012, 10:50
Re: Slap Command - by Michael_Cruise - 13.06.2012, 11:04
Re: Slap Command - by -CaRRoT - 13.06.2012, 11:08
Re: Slap Command - by Nicks - 13.06.2012, 11:12
Re: Slap Command - by jop9888 - 13.06.2012, 11:29
Re: Slap Command - by Michael_Cruise - 13.06.2012, 11:41
Re: Slap Command - by WeCstoR - 09.12.2012, 10:38
Re: Slap Command - by mittukuttan - 22.01.2013, 12:01
Re: Slap Command - by PaulDinam - 22.01.2013, 12:19
AW: Slap Command - by Blackazur - 22.01.2013, 12:25
Re: Slap Command - by Threshold - 22.01.2013, 12:50
Re: Slap Command - by Coffeely - 16.03.2014, 14:42
Re: Slap Command - by iThePunisher - 16.03.2014, 14:57
Re: Slap Command - by Greaper - 16.03.2014, 15:02
Re: Slap Command - by Guest4390857394857 - 16.03.2014, 15:12

Forum Jump:


Users browsing this thread: 1 Guest(s)