06.06.2012, 15:13
(
Последний раз редактировалось lewismichaelbbc; 06.06.2012 в 16:26.
)
how can i convert this code to strcmd?
Код:
CMD:vsetcolor(playerid, params[]) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You must be admin to use this command!"); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You must be in a vehicle to change its color!"); new vColors[2], iMsg[65], ivID = GetPlayerVehicleID(playerid); if(sscanf(params, "ii", vColors[0], vColors[1])) return SendClientMessage(playerid, -1, ""#CRED"Usage: "#CORANGE"/vSetColor < Color1 > < Color2 >"); if(OwnedVeh(ivID) != 0) { ChangeVehicleColor(OwnedVeh(ivID), vColors[0], vColors[1]); vehicleinfo[OwnedVeh(ivID)][vColor1] = vColors[0]; vehicleinfo[OwnedVeh(ivID)][vColor2] = vColors[1]; format(iMsg, sizeof(iMsg), ""#CDGREEN"You've set this vehicle's color to: "#CBLUE"%i - %i", vColors[0], vColors[1]); SendClientMessage(playerid, -1, iMsg); SavePrivVeh(OwnedVeh(ivID)); return 1; } else return SendClientMessage(playerid, COLOR_RED, "This is not a buyable vehicle!"); }