pawn Код:
if(strcmp(cmd, "/cv", true) == 0) {
new tmp[256];
new plid;
new cor1,cor2;
new veiculo;
new Float:X,Float:Y,Float:Z,Float:Angle;
tmp = strtok(cmdtext, idx);
cor1 = strval(tmp);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "| ERRO | Digite: /cv [id]");
return 1;
}
if(IsPlayerConnected(playerid)){
if(plid >= 400 && plid <= 611){
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
new carro = CreateVehicle(plid, X, Y, Z, Angle, -1, -1, 120000);
PutPlayerInVehicle(playerid,carro,0);
if(GetPlayerInterior(playerid))
veiculo = GetPlayerVehicleID(playerid);
LinkVehicleToInterior(carro,GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carro,GetPlayerVirtualWorld(playerid));
ChangeVehicleColor(veiculo,cor1,cor2);
format(string, sizeof(string), "| Carro-Car | Vocк criou o veнculo de 'ID %d , Cor1 %d , Cor2 %d.", plid,cor1,cor2);
SendClientMessage(playerid, outraadm, string);
return 1;
}else{
SendClientMessage(playerid, Vermelho, "| ERRO | ID invбlido || ID's = 400-611");
return 1;
}
}
}