Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////Credits to John Ledingham! Please do not change the credits./////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- CMD:buymask
- if (!IsAt247(playerid)) {
- SendClientMessageEx(playerid, COLOR_GRAD2, " You are not in a 24/7!");
- return 1;
- {
- //Put here your thing to check if he is logged in,i will use PlayerLogged as an example:
- if(PlayerLogged[playerid] != 1) return SendClientMessage(playerid, -1, "You must be logged in to use this command.");
- if(GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid, -1, "You dont have enough cash to buy a mask."); //you can change the price later
- if(IsPlayerInRangeOfPoint(playerid, range, posx, posy, posz))
- {
- GivePlayerMoney(playerid, -20000);
- pInfo[playerid][pMask] = 1;
- pInfo[playerid][pMasked] = 0;
- SendClientMessage(playerid, -1, "You have successfully bought a mask for 20000 San Andreas Dollars.");
- }
- return 1;
- }
- CMD:mask(playerid)
- {
- if(PlayerLogged[playerid] != 1) return SendClientMessage(playerid, -1, "You must be logged in to use this command.");
- if(pInfo[playerid][pMask] == 0) return SendClientMessage(playerid, -1, "You do not have a mask.");
- if(pInfo[playerid][pMasked] == 0)
- {
- pInfo[playerid][pMasked] = 1;
- SendClientMessage(playerid, -1, "You have put on your mask.");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- ShowPlayerNameTagForPlayer(i, playerid, false);
- }
- }
- else
- {
- pInfo[playerid][pMasked] = 0;
- SendClientMessage(playerid, -1, "You have removed your mask.");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- ShowPlayerNameTagForPlayer(i, playerid, true);
- }
- }
- return 1;
- }
- //Put this under OnPlayerText in the part of using normal IC chat
- if(pInfo[playerid][pMasked] == 0)
- {
- //normal chat IC,in your script
- }
- else
- {
- new string[128];
- format(string, sizeof(string), "Stranger says: %s, put chat here);
- }
Advertisement
Add Comment
Please, Sign In to add comment