/lastdriver help
#8

pawn Код:
if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
{
    new query[512],vehicleid2;
    vehicleid2 = vSQLID[vehicleid]; // Wherever you store the SQL ID
    format(query,sizeof(query),"UPDATE `vehicles` SET `LastDriver` = '%s' WHERE `VehicleID` = '%d'",pName(playerid),vehicleid2);
    mysql_query(query);
    mysql_free_result();
}
You didn't wrap the value with apostrophes ( ' ) nor are you giving vehicleid2 an ID (0). This should work.
Reply


Messages In This Thread
/lastdriver help - by Mitchy - 20.12.2013, 13:33
Re: /lastdriver help - by ikey07 - 20.12.2013, 13:39
Re: /lastdriver help - by Mitchy - 20.12.2013, 13:47
Re: /lastdriver help - by Mitchy - 20.12.2013, 13:52
Re: /lastdriver help - by ikey07 - 20.12.2013, 14:08
Re: /lastdriver help - by cessil - 20.12.2013, 14:09
Re: /lastdriver help - by Mitchy - 20.12.2013, 14:18
Re: /lastdriver help - by tyler12 - 20.12.2013, 14:57
Re: /lastdriver help - by tyler12 - 20.12.2013, 15:20
Re: /lastdriver help - by DemME - 20.12.2013, 20:03

Forum Jump:


Users browsing this thread: 2 Guest(s)