Bug vehicle color
#9

pawn Код:
CMD:vcolor(playerid, vehicleid, params[])
{
    vehicleid = GetPlayerVehicleID(playerid);
    new c1,c2,string[127];
    new incar = IsPlayerInAnyVehicle(playerid);
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED, "You are not driving a vehicle!");
    if(sscanf(params,"dD",c1,c2)) return SendClientMessage(playerid, -1, "INFO: /vcolor [color1] [color2]");
    if(c1<0||c1>127) return SendClientMessage( playerid, -1, "Invalid id color one.") ;
    if(c2<0||c2>127) return SendClientMessage( playerid, -1, "invalid id color two.") ;
    //new query[128],string[128];
    //format(query,sizeof(query),"UPDATE cars SET color1='%i',color2,='%i'WHERE id='%i'",cInfo[i][c_c1],cInfo[i][c_c2],cInfo[i][db_id]);
    //mysql_function_query(dbhandle,query,false,"","");
    format(string, sizeof(string), "Ti-ai setat culorile dorite !!");
    SendClientMessage(playerid, -1, string);
    ChangeVehicleColor(vehicleid, c1, c2);
    SaveVehicle(vehicleid);
    return 1;
}
It's GetPlayerVehicleID not GetVehicleID, however you're not using the vehicleid parameter in GetPlayerVehicleID you're using the one "id" I've removed it in my code above because it's useless.
pawn Код:
vehicleid = GetPlayerVehicleID(playerid);
Reply


Messages In This Thread
Bug vehicle color - by Mititel - 08.05.2014, 15:21
Re: Bug vehicle color - by Mititel - 09.05.2014, 07:23
Re : Bug vehicle color - by Sc0tt - 09.05.2014, 07:31
Re: Bug vehicle color - by Konstantinos - 09.05.2014, 08:30
Re: Bug vehicle color - by gekas - 09.05.2014, 10:50
Re: Bug vehicle color - by Konstantinos - 09.05.2014, 10:54
Re: Bug vehicle color - by Mititel - 11.05.2014, 12:47
Re: Bug vehicle color - by Mititel - 21.05.2014, 17:15
Re: Bug vehicle color - by DaniceMcHarley - 21.05.2014, 17:38

Forum Jump:


Users browsing this thread: 2 Guest(s)