28.09.2013, 14:26
(
Последний раз редактировалось AnonScripter; 28.09.2013 в 14:52.
Причина: more explain
)
When someone in range of point, if he type number 1 on chat, it will show him a textdraw with some option
1. Repair
2. Refuel
3. Colors
if he type [1], it will show him another options
Repairs System:
1. repair vehicle
2. add nos
3. change wheels type
now if he typed 1, it must repair his vehicle but it repair it from the first time he type 1, not the second time.
i have this, tell me what's wrong, the problem is when he type number 1 from the first time, it will repair his vehicle directly and if he type number 2, it will switch him to (refuels system) not add nos
i mean how to make number 1 is doing different things in the same range of point, rely on what text draw is showing now
Note: the (x,y,z) coordinates that is in range of point stands for a checkpoint, so if there is another way to make everything work, please tell me.
1. Repair
2. Refuel
3. Colors
if he type [1], it will show him another options
Repairs System:
1. repair vehicle
2. add nos
3. change wheels type
now if he typed 1, it must repair his vehicle but it repair it from the first time he type 1, not the second time.
i have this, tell me what's wrong, the problem is when he type number 1 from the first time, it will repair his vehicle directly and if he type number 2, it will switch him to (refuels system) not add nos
i mean how to make number 1 is doing different things in the same range of point, rely on what text draw is showing now
pawn Код:
public OnPlayerText(playerid, text[])
{
if(IsPlayerInRangeOfPoint(playerid,1.0,x,y,z))
{
if(strval(text) == 1)
{
Showing[playerid] = 0;
TextDrawHideForPlayer(playerid, RepairOptions);
TextDrawHideForPlayer(playerid, RefuelOpions);
TextDrawHideForPlayer(playerid, ColorsOptions);
Showing[playerid] = 1;
TextDrawShowForPlayer(playerid, RepairSystem);
TextDrawShowForPlayer(playerid, RepairVehicle);
TextDrawShowForPlayer(playerid, AddNos);
TextDrawShowForPlayer(playerid, ChangeWheels);
{
if (strval(text) == 1)
{
new playermoney = GetPlayerMoney(playerid);
if(playermoney >= 3000) return RepairVehicle(playerid), GivePlayerMoney(playerid,-3000);
}
}
}
}
return 1;
}