Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/heal", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new location = PlayerInfo[playerid][pLocal];
- if(!strlen(tmp))
- {
- if(location != 255)
- {
- if(location < 99)
- {
- if(HouseInfo[location][hArm] == 1 && IsACop(playerid))
- {
- SetPlayerArmour(playerid,99);
- PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "You have been healed to 100 armour.");
- SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
- }
- else
- {
- format(string, sizeof(string), "This place does not have armour upgrades.");
- SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
- }
- if(HouseInfo[location][hHel] == 1)
- {
- new Float:tempheal;
- GetPlayerHealth(playerid,tempheal);
- if ( tempheal < 99)
- {
- SetPlayerHealth(playerid, 99);
- PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "You have been healed to 100 health.");
- SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
- }
- else
- {
- SendClientMessage(playerid, TEAM_GREEN_COLOR,"You are already healed to 100.");
- }
- }
- else
- {
- format(string, sizeof(string), "This place does not have healing upgrades.");
- SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
- }
- return 1;
- }
- if(location == 101 || location == 99)//Restaurant & GSLS
- {
- new Float:tempheal;
- GetPlayerHealth(playerid,tempheal);
- if(tempheal < 99)
- {
- SetPlayerHealth(playerid,99);
- PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "You have been healed to 100 health.");
- SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
- }
- else
- {
- SendClientMessage(playerid, TEAM_GREEN_COLOR,"You are already healed to 100.");
- }
- }
- if(location == 102 && IsACop(playerid)) // Armoury
- {
- SetPlayerHealth(playerid,99);
- format(string, sizeof(string), "* %s puts on body armour.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- TogglePlayerControllable(playerid, 0);
- GetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]);
- Unspec[playerid][sPint] = PlayerInfo[playerid][pInt];
- Unspec[playerid][sLocal] = PlayerInfo[playerid][pLocal];
- SetPlayerPos(playerid,255.3,77.4,1003.6);
- PlayerInfo[playerid][pLocal] = 255;
- SetPlayerInterior(playerid,99);
- Spectate[playerid] = 257;
- }
- }
- else
- {
Advertisement
Add Comment
Please, Sign In to add comment