parking system
#3

https://sampforum.blast.hk/showthread.php?tid=187229

I AM USING ZCMD
pawn Код:
CMD:parkmeter(playerid, params[])
{
   if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You are not in a vehicle");
   if(!IsPlayerInRangeOfParkMeter(playerid)) return SendClientMessage(playerid, -1, "You are not near a park meter");
   new minute;
   if(sscanf(params, "i", minute)) return SendClientMessage(playerid, -1, "USAGE: /parkmeter [minutes]");
   if(minute <= 0) return SendClientMessage(playerid, -1, "The minutes need to be more than 1");
   GivePlayerMoney(playerid, -minute);
   return 1;
}

stock IsPlayerInRangeOfParkMeter(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 2, 2227.3281,1655.5314,961.7531)) return 1;
    else if(IsPlayerInRangeOfPoint(playerid, 2, 2228.5593,1651.2610,961.7596)) return 1;
    return 0;
}
//put ur own cords and radius
from your explanation that is what i got
Reply


Messages In This Thread
parking system - by Stanford - 16.01.2013, 15:13
AW: parking system - by IPrototypeI - 16.01.2013, 15:26
Re: parking system - by Glad2BeHere - 16.01.2013, 15:32
Re: parking system - by Stanford - 17.01.2013, 11:29
Re: parking system - by RajatPawar - 17.01.2013, 12:03

Forum Jump:


Users browsing this thread: 2 Guest(s)