07.04.2009, 12:42
[color=red]General Saints Hospital Code
-This is for people who want the general saints hospital to have an option to /healme. You can change the amount it charges in the code.
Put this at the top of your script:
Put this below "CreateVehicle"s:
Put this at the very bottom under "OnPlayerPickUpPickup":
And lastly, put this somewhere in "OnPlayerCommandText":
You can edit that code and set the amount it charges:
It will check if the player has that amount.
This will subtract money. Change the -300 to whatever you want.
Hope it helps.
-This is for people who want the general saints hospital to have an option to /healme. You can change the amount it charges in the code.
Put this at the top of your script:
Код:
new hospitalpickup;
Код:
hospitalpickup = CreatePickup(1240,1,1172.6083,-1323.5745,15.4031); // Hospital
Код:
if (pickupid == hospitalpickup) { GameTextForPlayer(playerid, "~r~General Saints Hospital~n~~y~Type /healme to be healed~n~Healing: 300$",5000, 3); } }
Код:
if (strcmp(cmdtext, "/healme", true) == 0) { if(PlayerToPoint(3, playerid, 1172.6083,-1323.5745,15.4031)) // 24/7 enterance if(GetPlayerMoney(playerid) > 300) { GivePlayerMoney(playerid,-300); SendClientMessage(playerid, COLOR_WHITE, "You have been healed for 300$"); SendClientMessage(playerid, COLOR_RED, "If you didn't get healed, you"); SendClientMessage(playerid, COLOR_RED, "obviously don't have enough money."); SetPlayerHealth(playerid,100); } return 1; }
Код:
if(GetPlayerMoney(playerid) > 300)
Код:
GivePlayerMoney(playerid,-300);
Hope it helps.