[ajuda] AddVehicleComponent - array13 - 03.09.2011
Olб a todos,eu estou a tentar fazer 1 tune command para o meu server.
Mas eu tenho erros...
este й o codigo(unico que dб erro)
PHP код:
COMMAND:tune(playerid,params[])
{
SendAdminText(playerid, "/tune", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerScore] < 500)
{
if (vehicleid == vehicle)
AddVehicleComponent(vehicle,1010);
AddVehicleComponent(vehicle,1080);
AddVehicleComponent(vehicle,1087);
}
}
else
return 0;
return 1;
}
os erros sгo:
PHP код:
D:\Programas\ficheiros\sanandreas servers\truckig gamemode\gamemodes\trucking.pwn(3295) : error: 017: undefined symbol "vehicleid"
D:\Programas\ficheiros\sanandreas servers\truckig gamemode\gamemodes\trucking.pwn(3295) : error: 017: undefined symbol "vehicle"
D:\Programas\ficheiros\sanandreas servers\truckig gamemode\gamemodes\trucking.pwn(3295) : error: 017: undefined symbol "vehicle"
D:\Programas\ficheiros\sanandreas servers\truckig gamemode\gamemodes\trucking.pwn(3295) : error: 017: undefined symbol "vehicle"
Re: [ajuda] AddVehicleComponent -
Pharrel - 03.09.2011
pawn Код:
COMMAND:tune(playerid,params[])
{
SendAdminText(playerid, "/tune", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerScore] < 500)
{
new vehicle = GetPlayerVehicleID(playerid);
new vehicleid = ??//nao entendi oq й q o vehicleid faz ~^
if (vehicleid == vehicle)
AddVehicleComponent(vehicle,1010);
AddVehicleComponent(vehicle,1080);
AddVehicleComponent(vehicle,1087);
}
}
else
return 0;
return 1;
}
Se nem vocк sabe oq faz o vehicleid entao deixa assim:
pawn Код:
COMMAND:tune(playerid,params[])
{
SendAdminText(playerid, "/tune", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerScore] < 500)
{
new vehicle = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicle,1010);
AddVehicleComponent(vehicle,1080);
AddVehicleComponent(vehicle,1087);
}
}
else
return 0;
return 1;
}
Re: [ajuda] AddVehicleComponent -
WLSF - 03.09.2011
precisa definir 'vehicleid e vehicle'
tipo ID dos veiculos...
tente
pawn Код:
COMMAND:tune(playerid,params[])
{
SendAdminText(playerid, "/tune", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerScore] < 500)
{
new vehicle = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicle,1010);
AddVehicleComponent(vehicle,1080);
AddVehicleComponent(vehicle,1087);
}
}
else
return 0;
return 1;
}
Re: [ajuda] AddVehicleComponent - array13 - 03.09.2011
nгo da erro mas nao trabalha in-gam(nenhum dos que foram aqui postados)
Re: [ajuda] AddVehicleComponent -
Pharrel - 03.09.2011
Vc usou o comando dentro de um veiculo? um veiculo em que pode-se adicionar NITRO, HYDRAULICS e n sei oq й o outro component?
o PlayerScore da conta era menor que 500?
Re: [ajuda] AddVehicleComponent - array13 - 03.09.2011
Primeiro,dentro do vehiculo,segundo: +500 score
3: num truck da nitro e hidraulics(ja apagei o outro)
Re: [ajuda] AddVehicleComponent -
Pharrel - 03.09.2011
Segundo seu comando sу quem tem MENOS que 500 score pode usar o comando...
pawn Код:
COMMAND:tune(playerid,params[])
{
SendAdminText(playerid, "/tune", params);
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerScore] >= 500)
{
new vehicle = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicle,1010);
AddVehicleComponent(vehicle,1080);
AddVehicleComponent(vehicle,1087);
}
}
else
return 0;
return 1;
}
Assim sу quem tiver 500 de score ou mais vai poder usar...
Re: [ajuda] AddVehicleComponent - array13 - 03.09.2011
Haaaaa,eskeзime disso -.-