Problem! +REP
#3

Код HTML:
new vehicleid = CreateVehicle(dmodelid[playerid], 298.5601,-1536.6544,24.2187,53.8474, 1, 1, -1);
            new Float:vehx, Float:vehy, Float:vehz, Float:z_rot;
            GetVehiclePos(vehicleid, vehx, vehy, vehz); GetVehicleZAngle(vehicleid, z_rot);
            mysql_format(MySQLCon, query, sizeof(query), "INSERT INTO `vehicles` (`Owner`, `Model`, `PosX`, `PosY`, `PosZ`, `VAngle`, `Color1`, `Color2`, \
            `Value`, `Lock`, `Plate`, `Class`, `ServerID`) VALUES \
            ('%d', '%d', '%f', '%f', '%f', '%f', '%d', '%d', '%d', '%d', '%s', '%s', '%d')", pInfo[playerid][pID] \
            ,dmodelid[playerid], vehx, vehy, vehz, z_rot, 1, 1, dprice[playerid]/2, 1, GetName(playerid), "Sport", vehicleid);
            mysql_tquery(MySQLCon, query, "OnVehInsert", "id", vehicleid, playerid);
Код HTML:
forward OnVehInsert(vehicleid, playerid);
public OnVehInsert(vehicleid, playerid)
{
    Veh[vehicleid][ID] = cache_insert_id();
    new did = Veh[vehicleid][ID];
    SetVehicleNumberPlate(vehicleid, GetName(playerid));
    strmid(Veh[did][Plate], GetName(playerid), 0, strlen(GetName(playerid)), 255);
    orm_update(Veh[did][ORM_ID]);
    SetVehicleToRespawn(vehicleid);
    return 1;
}
Reply


Messages In This Thread
Problem! +REP - by norton2 - 19.09.2015, 16:31
Re: Problem! +REP - by X337 - 19.09.2015, 16:54
Re: Problem! +REP - by norton2 - 19.09.2015, 16:58
Re: Problem! +REP - by norton2 - 20.09.2015, 06:10

Forum Jump:


Users browsing this thread: 1 Guest(s)