Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:slap(playerid, params[]) {
- new string[180],id;
- if(PlayerInfo[playerid][pAdmin] < 1 || PlayerInfo[playerid][pHelper] < 1) return 1;
- if(sscanf(params, "u",id)) return SendClientMessage(playerid,COLOR_RED, "Usage: {FFFFFF}/slap <playerid/name>");
- if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
- if(TutorialActive[id] == 1) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player este in tutorial!");
- new Float:shealth;
- if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_GREY, "Nu poti executa aceasta comanda pe acel player!");
- new Float:slx, Float:sly, Float:slz;
- GetPlayerHealthEx(id, shealth);
- SetPlayerHealthEx(id, shealth-5);
- GetPlayerPos(id, slx, sly, slz);
- SetPlayerPosEx(id, slx, sly, slz+5);
- PlayerPlaySound(id, 1190, slx, sly, slz+5);
- format(string, sizeof(string), "Warning: %s has slapped %s.", GetName(playerid),GetName(id));
- if(GetPVarInt(playerid, "Cover") == 0) SendStaffMessage(COLOR_LOGS, string);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement