Buy vehicle - 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: Buy vehicle (
/showthread.php?tid=520918)
Buy vehicle -
Bek_Loking - 20.06.2014
My friend is a scripter as well but he doesn't know how to post on forums so I'm posting this for him. Here's his problem. He wants a car to teleport ( or create itself ) when a player buys it. Here's his script:
Код:
if(GetPlayerMoney(playerid) < 110000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money.")
GivePlayerMoney(playerid, 110000);
SendClientMessage(playerid, 0x99FFFF, "0xFF6600[CARDEALER]0x99FFFFYou bought swat-tank.");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateVehicle(601, x, y, z, 0, 1, 5000000000); <- linija gdje se to desava [warning line]
He gets these warnings:
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial .pwn(741) : warning 202: number of arguments does not match definition
Re: Buy vehicle -
Konstantinos - 20.06.2014
You forgot the angle parameter after z and just use -1 as respawn delay. By the way if you want to remove the money, then use "-" before the amount otherwise it will give that money.
Re: Buy vehicle -
Bek_Loking - 20.06.2014
edit: he deleted that and started over with that gonna hit you up if he messes something and I don't know how to fix it