Guest User

[FS]Mask System By Faiz

a guest
Jan 25th, 2013
578
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. // Credit Faiz
  2. // Thanks To Allah SWT And Forum Samp
  3.  
  4. #include <a_samp>
  5. #include <zcmd>
  6. #include <color>
  7. new OldUsername[MAX_PLAYER_NAME][MAX_PLAYERS];
  8. new Masked[MAX_PLAYERS] = 0;
  9.  
  10. CMD:mask(playerid, params[])
  11. {
  12. if(Masked[playerid] == 0)
  13. {
  14. new randomID = random(200);
  15. new string[35];
  16. Masked[playerid] = 1;
  17. GetPlayerName(playerid, string, sizeof(string));
  18. strmid(OldUsername[playerid], string, 0, strlen(string), 64);
  19. format(string,sizeof(string), "Stranger", randomID);
  20. SetPlayerName(playerid, string);
  21. SetPlayerAttachedObject(playerid, 1, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);
  22. SendClientMessage(playerid, COLOR_WHITE, "You have put on a mask! (/mask to romove it)");
  23. for(new i = 0; i < MAX_PLAYERS; i++)
  24. {
  25. ShowPlayerNameTagForPlayer(i, playerid, 0);
  26. }
  27. }
  28. else
  29. {
  30. SetPlayerName(playerid, OldUsername[playerid]);
  31. Masked[playerid] = 0;
  32. SendClientMessage(playerid, COLOR_WHITE, "You have removed your mask!");
  33. if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
  34. for(new i = 0; i < MAX_PLAYERS; i++)
  35. {
  36. ShowPlayerNameTagForPlayer(i, playerid, 1);
  37. }
  38. }
  39. return 1;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment