25.04.2012, 09:13
(
Последний раз редактировалось MP2; 25.04.2012 в 10:20.
)
Elaborate. Have you already made them?
You should use a server-sided money system using variables to store money as opposed to GetPlayerMoney to prevent cheating.
To trigger it, I would personally create an invisible pickup (ID 19300) that is pickupable from vehicles (pickup type 14) so that when they pull up to the toll booth it triggers OnPlayerPickUpPickup. This is a more efficient way than constant IsPlayerInRangeOfPoint checks.
You should use a server-sided money system using variables to store money as opposed to GetPlayerMoney to prevent cheating.
pawn Код:
if(pCash[playerid] < 50) return SendClientMessage(playerid, COLOR_RED, "Toll: $50 - Insufficient Funds.");
// Take the funds and open the gate
pCash[playerid] -= 50;
GivePlayerMoney(playerid, -50);