Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Credit Faiz
- // Thanks To Allah SWT And Forum Samp
- #include <a_samp>
- #include <zcmd>
- #include <color>
- new OldUsername[MAX_PLAYER_NAME][MAX_PLAYERS];
- new Masked[MAX_PLAYERS] = 0;
- CMD:mask(playerid, params[])
- {
- if(Masked[playerid] == 0)
- {
- new randomID = random(200);
- new string[35];
- Masked[playerid] = 1;
- GetPlayerName(playerid, string, sizeof(string));
- strmid(OldUsername[playerid], string, 0, strlen(string), 64);
- format(string,sizeof(string), "Stranger", randomID);
- SetPlayerName(playerid, string);
- SetPlayerAttachedObject(playerid, 1, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);
- SendClientMessage(playerid, COLOR_WHITE, "You have put on a mask! (/mask to romove it)");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- ShowPlayerNameTagForPlayer(i, playerid, 0);
- }
- }
- else
- {
- SetPlayerName(playerid, OldUsername[playerid]);
- Masked[playerid] = 0;
- SendClientMessage(playerid, COLOR_WHITE, "You have removed your mask!");
- if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- ShowPlayerNameTagForPlayer(i, playerid, 1);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment