SA-MP Forums Archive
Money, Timers +REPUTATION - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Money, Timers +REPUTATION (/showthread.php?tid=399034)



Money, Timers +REPUTATION - truckingserver - 12.12.2012

Hello dear scripters
I have made a code if u wanna enter moonbeam(car) you need 50 score to drive it
Now i wanna made a code for this car if player Drives Moonbeam(Car)(ID 418 )
Player earns 20 Money / Min
+REP Who will did

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	if(GetVehicleModel(vehicleid) == 418) //BMX
	{
		if(GetPlayerScore(playerid) < 50)
		{
			RemovePlayerFromVehicle(playerid);
			SendClientMessage(playerid,0xAA3333AA,"You need 50 score to drive this car.");
			return 1;



Re: Money, Timers +REPUTATION - [HK]Ryder[AN] - 12.12.2012

this
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicleid) == 418) //BMX
    {
        if(GetPlayerScore(playerid) < 50)
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid,0xAA3333AA,"You need 50 score to drive this car.");
        }
        SetTimerEx("wincash", 60000, true, "i", playerid);
    }
    return 1;
}
//Now outside any callback.
forward wincash(playerid);
public wincash(playerid)
{
    GivePlayerMoney(playerid, 20);
    return 1;
}



Re: Money, Timers +REPUTATION - truckingserver - 12.12.2012

xD I made a fail i write BMX xD

Ty +REP For you
You're Best