Advertisement
Guest User

Untitled

a guest
May 21st, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. CMD:slap(playerid, params[]) {
  2. new string[180],id;
  3. if(PlayerInfo[playerid][pAdmin] < 1 || PlayerInfo[playerid][pHelper] < 1) return 1;
  4. if(sscanf(params, "u",id)) return SendClientMessage(playerid,COLOR_RED, "Usage: {FFFFFF}/slap <playerid/name>");
  5. if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
  6. if(TutorialActive[id] == 1) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player este in tutorial!");
  7. new Float:shealth;
  8. if(PlayerInfo[id][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_GREY, "Nu poti executa aceasta comanda pe acel player!");
  9. new Float:slx, Float:sly, Float:slz;
  10.  
  11. GetPlayerHealthEx(id, shealth);
  12. SetPlayerHealthEx(id, shealth-5);
  13. GetPlayerPos(id, slx, sly, slz);
  14. SetPlayerPosEx(id, slx, sly, slz+5);
  15. PlayerPlaySound(id, 1190, slx, sly, slz+5);
  16.  
  17. format(string, sizeof(string), "Warning: %s has slapped %s.", GetName(playerid),GetName(id));
  18. if(GetPVarInt(playerid, "Cover") == 0) SendStaffMessage(COLOR_LOGS, string);
  19. return 1;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement