CMD:vvcolor(playerid, params[])
{
if(PlayerInfo[playerid][pPcarkey] == 9999 && PlayerInfo[playerid][pPcarkey2] == 9999)
{
SendClientMessage(playerid, COLOR_GREY,"* You don't have a vehicle to respray.");
return 1;
}
new c1, c2;
if (sscanf(params, "uu", c1, c2)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /vcolor [ID] [ID]");
if(c1 < 0 && c1 > 126)
{
SendClientMessage(playerid, COLOR_GREY, " Wrong color id!");
return 1;
}
if(c2 < 0 && c2 > 126)
{
SendClientMessage(playerid, COLOR_GREY, " Wrong color id!");
return 1;
}
new vehid;
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { vehid = PlayerInfo[playerid][pPcarkey]; }
else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { vehid = PlayerInfo[playerid][pPcarkey2]; }
else { return 1; }
if(IsPlayerInVehicle(playerid, vehid))
{
CarInfo[vehid][cColorOne] = c1;
CarInfo[vehid][cColorTwo] = c2;
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x,y,z);
ChangeVehicleColor(vehid, c1, c2);
ChangeVehicleColor(vehid, c1, c2);
OnPropUpdate(4,vehid);
OnPlayerUpdateEx(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY," You are not in your vehicle.");
return 1;
}
}
i cant do this but i have a different command in my gm that i can give u
|