New slap command i hope u guys like it :- if you have this command so sorry if someone dont have this command enjoy with slapping ahhahahahaxD
[pawn]else if ( strcmp( cmd, "slap", true ) == 0 )
{
new reason[ 256 ], plr;
IsPlayerAdmin(playerid);
tmp = strtok( cmdtext, idx ), reason = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, GREEN, "Please log-in to your account." );
else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, BLUE, "You don't have access to use this command!" );
else if ( !strlen(reason) ) SendClientMessage( playerid, COLOR_RED, "USAGE: /c slap [Nick/ID] [Reason]" );
else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
else
{
new Float:x, Float:y, Float:z, szMsg[ 128 ];
GetPlayerPos( plr, x, y, z );
SetPlayerPos( plr, x+30, y+10, z+20, 0, 0 );
format( szMsg, sizeof( szMsg ), "Administrator %s slaped player %s Reason:[ %s ]", gPlayers[ playerid ], gPlayers[ plr ], cmdtext[ strlen( tmp ) +6 ] );
SendClientMessageToAll( BLUE, szMsg );
GameTextForPlayer (plr, " You ~p~Have ~b~been ~o~slaped ");
SetPlayerDrunk(plr, 300, 300);
}
return 1;
}[/pawn]