22.06.2011, 15:26
pawn Код:
CMD:plate(playerid, params[]) {
if(playerVariables[playerid][pAdminLevel] >= 4) {
if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/plate [number plate]");
else if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You must be inside the vehicle that you wish to change the model of.");
new
string[256],
Float:cwx2,
Float:cwy2,
Float:cwz2,
currentveh = GetPlayerVehicleID(playerid);
GetVehiclePos(currentveh, cwx2, cwy2, cwz2);
SetVehicleNumberPlate(currentveh,"params");
mysql_real_escape_string(params, vehicleVariables[currentveh][vVehicleNumberP]);
saveVehicle(currentveh);
mysql_query(string);
SetVehicleToRespawnEx(currentveh);
SetVehiclePos(currentveh, cwx2+1, cwy2, cwz2);
return 1;
}
return 1;
}