23.06.2009, 00:31
I have made one checkpoint that works (Got the help from people awhile back)
I wanted to add another one so i got this checkpoint streamer
http://forum.sa-mp.com/index.php?topic=35977.0
The problem i'm having is, I want to make a checkpoint that when you enter into it, it adds a menu to sell weapons.
I'm not sure how to make the menu, or how to add the weapons part, but when i add a checkpoint, it always links to my other checkpoint
So, when you enter the new checkpoint, it says the things the old checkpoints are suppose to say.
Heres the code for the old checkpoints properties and whats its suppose to do upon entering:
This is the code for my new checkpoint and where it's located
CPS_AddCheckpoint(3867.2412, -1601.9069,1441.6368, 3.0,100);// weapons menu
I wanted to add another one so i got this checkpoint streamer
http://forum.sa-mp.com/index.php?topic=35977.0
The problem i'm having is, I want to make a checkpoint that when you enter into it, it adds a menu to sell weapons.
I'm not sure how to make the menu, or how to add the weapons part, but when i add a checkpoint, it always links to my other checkpoint
So, when you enter the new checkpoint, it says the things the old checkpoints are suppose to say.
Heres the code for the old checkpoints properties and whats its suppose to do upon entering:
Код:
CPS_AddCheckpoint(2036.4734, -1402.9043,17.2983, 3.0,100); //hospital
Код:
if (strcmp("/heal", cmdtext, true, 10) == 0) { new Float:HP; GetPlayerHealth(playerid, HP); if (PlayerToPoint(2, playerid,2036.4734, -1402.9043,17.2983)) { if(HP <= 99) { GivePlayerMoney(playerid,-100); SetPlayerHealth(playerid, 100.0); SendClientMessage(playerid, COLOR_GREEN, "You have been healed, Hospital bill was $100"); } else { SendClientMessage(playerid, RED, "You do not require medical treatment!"); } } else { SendClientMessage(playerid, RED, "To use that command you need to be at the hospital Type /hospital"); } return 1; }
Код:
public OnPlayerEnterCheckpoint(playerid) { GameTextForPlayer(playerid, "~w~Welcome to the Hospital, Type /Heal to heal your HP! it costs $100 ~G~", 5000, 5); return 1; }
CPS_AddCheckpoint(3867.2412, -1601.9069,1441.6368, 3.0,100);// weapons menu