06.03.2014, 14:19
i guess you have to remove this to make it available everywhere, not just inside ambulances
basically, just remove all the vehicle related stuff
pawn Код:
new giveambu = GetPlayerVehicleID(giveplayerid);//just remove this
new playambu = GetPlayerVehicleID(playerid);//and this
if(IsAnAmbulance(playambu) && playambu == giveambu) //remove that check, we don't need it anymore
Код:
if(strcmp(cmd, "/heal", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "{7DAEFF}USAGE: /heal [playerid/PartOfName] [price]{7DAEFF}"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "{7DAEFF}USAGE: /heal [playerid/PartOfName] [price{7DAEFF}]"); return 1; } moneys = strvalEx(tmp); if(moneys < 200 || moneys > 1000) { SendClientMessage(playerid, COLOR_GREY, " Price can't be below $200 or above $1000 !"); return 1; } if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GRAD1, "You cannot heal yourself."); return 1; } if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) { new Float:tempheal; GetPlayerHealth(giveplayerid,tempheal); if(tempheal >= 100.0) { SendClientMessage(playerid, COLOR_GRAD1," That person is fully healed !"); return 1; } PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]+moneys; GivePlayerMoney(playerid,moneys); PlayerInfo[giveplayerid][pCash] = PlayerInfo[giveplayerid][pCash]-moneys; GivePlayerMoney(giveplayerid,-moneys); SetPlayerHealth(giveplayerid, 100); PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0); SendClientMessage(giveplayerid, COLOR_GRAD1, " You have been fully healed."); format(string, sizeof(string), "* Paramedic %s has healed %s for $%d.", sendername,giveplayer,moneys); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); if(STDPlayer[giveplayerid] > 0) { STDPlayer[giveplayerid] = 0; SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "* You are no longer infected with a STD !"); } } else { SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !"); return 1; } } } else { format(string, sizeof(string), " %d is not an active player !", giveplayerid); SendClientMessage(playerid, COLOR_GRAD1, string); } } return 1; }