17.11.2014, 18:43
I made it and it works now, here's the code:
but thank you both for the reply anyways!
pawn Код:
COMMAND:v(playerid, params[])
{
if(sscanf(params, "s", Vehicle)) return SendClientMessage(playerid, 0xF81414FF, "USAGE: /v [name].");
GetPlayerPos(playerid, X, Y, Z);
new veh = GetVehicleModelIDFromName(Vehicle);
if(veh < 400 || veh > 611) return SendClientMessage(playerid, 0xFFFFFFFF, "This is not a valid vehicle name! Please try again ");
new PVeh = CreateVehicle(veh, X, Y, Z, 0.0, 0, 0, 200);
format(String, sizeof String, "You spawned a %s. ID: %i. ", aVehicleNames[veh - 400], veh);
SendClientMessage(playerid, 0xFFFFFFFF, String);
return 1;
}