pawn Code:
//Includes usadas: ZCMD, sscanf2
//Crйditos aos donos das includes.
new carroc[MAX_PLAYERS];// Topo da GM
//Final da GM
CMD:v(playerid, params[]) {
new modelo;
if(sscanf(params, "d", modelo)){
return SendClientMessage(playerid, -1, "{FFFF00}(ERRO) Use: /V [ID]");
}
if(modelo < 400 || modelo > 611) return SendClientMessage(playerid, -1, "{FFFF00}(ERRO) Use uma ID vбlida");
DestroyVehicle(carroc[playerid]);
new Float:ppx, Float:ppy,Float:ppz,Float:ppa;
GetPlayerPos(playerid, ppx, ppy, ppz);
GetPlayerFacingAngle(playerid, ppa);
carroc[playerid] = CreateVehicle(modelo, Float:ppx, Float:ppy, Float:ppz, Float:ppa, 0, 0, -1, 0);
SetVehicleHealth(carroc[playerid], 2000);
new vw;
vw = GetPlayerVirtualWorld(playerid);
SetVehicleVirtualWorld(carroc[playerid], vw);
PutPlayerInVehicle(playerid, carroc[playerid], 0);
new msg2[120];
format(msg2, sizeof(msg2), "(INFO) Veнculo ID {FFFF00}(%d) {FFFFFF}criado com sucesso ", modelo);
SendClientMessage(playerid, -1, msg2);
return 1;
}