Problem with plate - 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: Problem with plate (
/showthread.php?tid=263561)
Problem with plate -
SILENT! - 22.06.2011
pawn Код:
CMD:plate(playerid, params[]) {
if(playerVariables[playerid][pAdminLevel] >= 4) {
if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/plate [number plate]");
else if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You must be inside the vehicle that you wish to change the model of.");
new
string[256],
Float:cwx2,
Float:cwy2,
Float:cwz2,
currentveh = GetPlayerVehicleID(playerid);
GetVehiclePos(currentveh, cwx2, cwy2, cwz2);
SetVehicleNumberPlate(currentveh,"params");
mysql_real_escape_string(params, vehicleVariables[currentveh][vVehicleNumberP]);
saveVehicle(currentveh);
mysql_query(string);
SetVehicleToRespawnEx(currentveh);
SetVehiclePos(currentveh, cwx2+1, cwy2, cwz2);
return 1;
}
return 1;
}
Where is the problem? In game i have the number plate, and in database not.
Re: Problem with plate -
SILENT! - 22.06.2011
So..?
Re: Problem with plate -
SILENT! - 22.06.2011
Fast ..
Re: Problem with plate -
SILENT! - 22.06.2011
So...?
Re: Problem with plate -
SpiderWalk - 22.06.2011
pawn Код:
CMD:plate(playerid, params[]) {
{
if(playerVariables[playerid][pAdminLevel] >= 4) {
if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/plate [number plate]");
else if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You must be inside the vehicle that you wish to change the model of.");
new
string[256],
Float:cwx2,
Float:cwy2,
Float:cwz2,
currentveh = GetPlayerVehicleID(playerid);
GetVehiclePos(currentveh, cwx2, cwy2, cwz2);
SetVehicleNumberPlate(currentveh,"params");
mysql_real_escape_string(params, vehicleVariables[currentveh][vVehicleNumberP]);
saveVehicle(currentveh);
mysql_query(string);
SetVehicleToRespawnEx(currentveh);
SetVehiclePos(currentveh, cwx2+1, cwy2, cwz2);
return 1;
}
return 1;
}
EDIT:Stop fucking spamming!
Re: Problem with plate -
SILENT! - 23.06.2011
You didn't change nothing.
Re: Problem with plate -
[TS]Ricky - 23.06.2011
Yo must create where to saving changed plates
Re: Problem with plate -
Sasino97 - 23.06.2011
where is string ? LoL
pawn Код:
new string[256];
//The string is empty lol, you didn't format it
mysql_query(string);
You must format the string, because it's empty
Re: Problem with plate -
SILENT! - 23.06.2011
Resolved, wasn't from string, LOL!
Re: Problem with plate - Max_Coldheart - 23.06.2011
Quote:
Originally Posted by SILENT!
Resolved, wasn't from string, LOL!
|
Please do not keep bumping your topic every half, or full hour. You are allowed yo bump your topic only once every 48 hours.