SA-MP Forums Archive
dcmd Car spawner with money help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: dcmd Car spawner with money help (/showthread.php?tid=222643)



dcmd Car spawner with money help - Freght - 07.02.2011

i trying to scripting a carspawner with /v [id / name] command with dcmd , but i would insert money for pay the spawn.
So when someone spawn a vehicle, he pays an amount of money, but i have difficulties for how insert :

if(getplayermoney(playerid) < 15000)
return SendClientMessage not enough money ecc ecc......

Someone can help me?
If u need i will put the FS here!

pls help me!
bb!


Re: dcmd Car spawner with money help - Rock18 - 07.02.2011

Код:
{
    if(GetPlayerMoney(playerid) < -15000)
    {
    SendClientMessage(playerid,COLOR_RED,"You Need 1500$");
    return 1;
    }
    //rest of code
    return 1;
    }



Re: dcmd Car spawner with money help - MMiz - 07.02.2011

Код:
if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid, 0xFFFFFFFF, "You need $15,000 to be able to buy a car!");



Re: dcmd Car spawner with money help - Freght - 07.02.2011

in: if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid, ecccc....
it says Unreachble code warning