Problem with plate
#1

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.
Reply
#2

So..?
Reply
#3

Fast ..
Reply
#4

So...?
Reply
#5

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!
Reply
#6

You didn't change nothing.
Reply
#7

Yo must create where to saving changed plates
Reply
#8

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
Reply
#9

Resolved, wasn't from string, LOL!
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)