CMD:v(playerid,params[])
{
new idcar,cor1,cor2,Float:c[3],Float:a;
if(pInfo[playerid][adm] <2) return SendClientMessage(playerid,vermelho,"Comando apenas para adm");
if(sscanf(params,"ddd",idcar,cor1,cor2)) return SendClientMessage(playerid,vermelho,"Use /v [idcar] [cor1] [cor2]");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,vermelho,"Vocк jб estб em um carro");
if(idcar <400 || idcar>611) return SendClientMessage(playerid,vermelho,"Carro invбlido,digite id's de 400 a 611");
GetPlayerPos(playerid,c[0],c[1],c[2]);
GetPlayerFacingAngle(playerid,a);
carros = CreateVehicle(idcar,c[0],c[1],c[2],a,cor1,cor2,6000);
PutPlayerInVehicle(playerid,carros,0);
SendClientMessage(playerid,verdeclaro,"Carro criado com sucesso");
return true;
}
CMD:destruirveh(playerid)
{
for(new b = 0; b < sizeof(carros); b++)
{
DestroyVehicle(carros[b]);
}
return 1;
}
Tenta ae, nгo testei!
pawn Код:
|
C:\Users\Vitor\Desktop\Server Gta Torcidas\gamemodes\gt.pwn(405) : error 028: invalid subscript (not an array or too many subscripts): "carros"
C:\Users\Vitor\Desktop\Server Gta Torcidas\gamemodes\gt.pwn(405) : warning 215: expression has no effect
C:\Users\Vitor\Desktop\Server Gta Torcidas\gamemodes\gt.pwn(405) : error 001: expected token: ";", but found "]"
C:\Users\Vitor\Desktop\Server Gta Torcidas\gamemodes\gt.pwn(405) : error 029: invalid expression, assumed zero
C:\Users\Vitor\Desktop\Server Gta Torcidas\gamemodes\gt.pwn(405) : fatal error 107: too many error messages on one line