08.08.2016, 08:43
Title
The command:
When i add this, it says: "/av isn't a valid command."
But when i leave it, it works.
The command:
PHP код:
else if(!strcmp(tmp, "model", true, 5))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientError(playerid, "You are not in any vehicle!");
if(!strlen(tmp2)) return SendClientUsage(playerid, "/v model [model name / model id]");
new tehvID;
if(!IsNumeric(tmp2)) tehvID = GetVehicleModelIDFromName(tmp2);
else tehvID = strval(tmp2);
if(tehvID == -1 || tehvID < 400 ||tehvID > 611) return SendClientError(playerid, "Invalid model!");
Vehicle[GetPlayerVehicleID(playerid)][vModel] = tehvID;
new query[500];
format(query,sizeof(query),"UPDATE Vehicles SET vModel='%i' WHERE id='%i'",tehvID,GetPlayerVehicleID(playerid));
mysql_tquery(connection,query,"","");
new staffmessage[126];
format(staffmessage,sizeof(staffmessage),"You have changed the model of this vehicle to %s",GetVehicleName(tehvID));
SendStaffMessage(playerid,staffmessage);
ReloadVehicle(GetPlayerVehicleID(playerid));
new Float:Position[3];
GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
SetPlayerPos(playerid, Position[0], Position[1], Position[2]+3);
}
PHP код:
new staffmessage[126];
format(staffmessage,sizeof(staffmessage),"You have changed the model of this vehicle to %s",GetVehicleName(tehvID));
SendStaffMessage(playerid,staffmessage);