Two questions
#1

Here is part of a command that i use, for vehicle buying, this command makes new entry into database, but i would like to know how can i spawn it into server immediately after buying, i'v tried CreateVehicle but game crashes.
Код:
new mysqlkasutajaid = GetSqlId(playerid);
new mysqlautoid = KokkuAutosi();
new arv = mysqlautoid + 1;
new sql[256];
format(sql, sizeof(sql), "INSERT INTO autod VALUES ('%d', 1, '%d', 'Cheetah', 415, 0, 0, -1, -1, 'Puudub', -1986.2124, -90.1492, 137.6636, 27.6875, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 'None', 0)", arv, mysqlkasutajaid);
SafeNewGivePlayerMoney(playerid, -10000);
samp_mysql_query(sql);
PlayerInfo[playerid][pPV6ti1] = arv;
OnGamePlayerUpdate(playerid);
SendClientMessage(playerid, COLOR_GREEN, "Korras.");
return 1;
Also i could use some help in creating command. The command should spawn vehicle onto one of five parking spots and only onto that parking spot where is no vehicle.
Reply


Messages In This Thread
Two questions - by iChris - 27.02.2009, 18:47
Re: Two questions - by iChris - 28.02.2009, 15:21

Forum Jump:


Users browsing this thread: 1 Guest(s)