11.12.2012, 17:24
Hi!
I need a little help with my car dealership system.
If a player buys a car, I want t he car to spawn, not only write it to mysql, but to make the car spawn, I have to get it to select only the car, the player buyed and spawn that one, but I don't know, how to do it.
The code:
((Translated frome Estonian
))
I need a little help with my car dealership system.
If a player buys a car, I want t he car to spawn, not only write it to mysql, but to make the car spawn, I have to get it to select only the car, the player buyed and spawn that one, but I don't know, how to do it.
The code:
pawn Код:
CMD:sultan(playerid, params[])
{
new string[555], omanikunimi[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][AutoV6ti] == 255)
{
GetPlayerName(playerid, omanikunimi, sizeof(omanikunimi));
format(string, 555, "INSERT INTO `autod` (autoid, myygis, omanik, v2rv1, v2rv2, pargitudX, pargitudY, pargitudZ, parkimisangle, model, poesmyygis) VALUES ('5', '0', '%s', '1', '1', '-785.3877', '2753.9294', '45.2800', '235.9695', '411', '0')", omanikunimi);
mysql_query(string);
}
else
{
SendClientMessage(playerid, punane, "U've already got a car!");
}
return 1;
}
((Translated frome Estonian
