21.05.2014, 17:38
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;
}
pawn Код:
vehicleid = GetPlayerVehicleID(playerid);