new2.pwn(2529) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
GiveVehicle(playerid, vehicleid, color1, color2) { if(!IsPlayerInAnyVehicle(playerid)) { if(CreatedVehicle[playerid]) { DestroyVehicle(CreatedVehicle[playerid]); CreatedVehicle[playerid] = 0; } new Float:x, Float:y, Float:z, Float:angle, string2[85]; GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); CreatedVehicle[playerid] = CreateVehicle(vehicleid, x, y, z, angle, color1, color2, -1); SetVehicleVirtualWorld(CreatedVehicle[playerid], GetPlayerVirtualWorld(playerid)); LinkVehicleToInterior(CreatedVehicle[playerid], GetPlayerInterior(playerid)); PutPlayerInVehicle(playerid, CreatedVehicle[playerid], 0); format(string2,sizeof(string2),"{FF0000}INFO SERVE{FFFFFF}Vocк criou o veнculo %s ID: %d", VehicleNames[vehicleid-400],vehicleid); SendClientMessage(playerid, -1, string2); return 1; } return 0; }
GiveVehicle(playerid, vehicleid, color1, color2)
{
if(!IsPlayerInAnyVehicle(playerid))
{
if(CreatedVehicle[playerid]) {
DestroyVehicle(CreatedVehicle[playerid]);
CreatedVehicle[playerid] = 0;
}
new Float:x, Float:y, Float:z, Float:angle, string2[85];
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
CreatedVehicle[playerid] = CreateVehicle(vehicleid, x, y, z, angle, color1, color2, -1);
SetVehicleVirtualWorld(CreatedVehicle[playerid], GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(CreatedVehicle[playerid], GetPlayerInterior(playerid));
PutPlayerInVehicle(playerid, CreatedVehicle[playerid], 0);
format(string2,sizeof(string2),"{FF0000}INFO SERVE{FFFFFF}Vocк criou o veнculo %s ID: %d", VehicleNames[vehicleid-400],vehicleid);
SendClientMessage(playerid, -1, string2);
return 1;
}
return 0;
}
CMD:car(playerid,params[]) { new veh[30], vehid, cor1, cor2; if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) return SendClientMessage(playerid, CorErro, "Vocк nгo pode criar um carro estando dentro de um."); if(sscanf(params, "iii", Numero, cor1, cor2)) return SendClientMessage(playerid, CorErro, "USE: /car [ID] [COR1] [COR2]"); if(sscanf(params,"s[30]dd",veh,cor1,cor2)) return SendClientMessage(playerid, CorErro, "USE [NOME OU ID] entre 400 e 611"); if(IsNumeric(veh)) vehid = strval(veh); else vehid = ReturnVehicleModelID(veh); if(vehid < 400 || vehid > 611) return SendClientMessage(playerid, CorErro,"[AVISO] Veнculo invalido"); { if(vehid == 520 || vehid == 432 || vehid == 592 || vehid == 425 || vehid == 464 || vehid == 406 || vehid == 476 || vehid == 447) return SendClientMessage(playerid, CorErro, "Este veнculo nгo й permitido neste mundo."); } GiveVehicle(playerid, vehid, cor1, cor2); FoiCriado[ID] = true; return 1; }
o comando n efetua por nome e sim por ids ( como faзo pra arruma ?)
Код:
CMD:car(playerid,params[]) { new veh[30], vehid, cor1, cor2; if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) return SendClientMessage(playerid, CorErro, "Vocк nгo pode criar um carro estando dentro de um."); if(sscanf(params, "iii", Numero, cor1, cor2)) return SendClientMessage(playerid, CorErro, "USE: /car [ID] [COR1] [COR2]"); if(sscanf(params,"s[30]dd",veh,cor1,cor2)) return SendClientMessage(playerid, CorErro, "USE [NOME OU ID] entre 400 e 611"); if(IsNumeric(veh)) vehid = strval(veh); else vehid = ReturnVehicleModelID(veh); if(vehid < 400 || vehid > 611) return SendClientMessage(playerid, CorErro,"[AVISO] Veнculo invalido"); { if(vehid == 520 || vehid == 432 || vehid == 592 || vehid == 425 || vehid == 464 || vehid == 406 || vehid == 476 || vehid == 447) return SendClientMessage(playerid, CorErro, "Este veнculo nгo й permitido neste mundo."); } GiveVehicle(playerid, vehid, cor1, cor2); FoiCriado[ID] = true; return 1; } |
CMD:car(playerid, params[])
{
new Carro, int, Veh, Cor1, Cor2, Float:cX, Float:cY, Float:cZ;
if(sscanf(params,"iii", Veh, Cor1, Cor2)) return SendClientMessage(playerid, -1, "[SERVER]: Use: /car [ID] [Cor] [Co]");
if(Veh < 400) return SendClientMessage(playerid, -1, "[SERVER]: Invalid Vehicle ID.");
GetPlayerPos(playerid, cX, cY, cZ);
Carro = CreateVehicle(Veh, cX, cY, cZ+1, 0, Cor1, Cor2, -1);
int = GetPlayerInterior(playerid), LinkVehicleToInterior(Carro, int);
PutPlayerInVehicle(playerid, Carro, 0);
return 1;
}
if(sscanf(params,"ddd",veh,cor1,cor2))
nгo sei se estou certo mas
PHP код:
|