GetVehicleModel is an invalid function? -
iLcke - 03.04.2012
pawn Код:
if(GetVehicleModel(vehicleid) == 411) // 411 is the infernus model
{
SendClientMessage(playerid, 0xFFFFFFFF, "Nice Infernus!");
}
This was copy pasted from the SA-MP wiki of GetVehicleModel.
I've tried complying it into my script to see if it was my code, or what, and I get an error saying GetVehicleModel is an invalid function. Why's this?
Re: GetVehicleModel is an invalid function? -
MP2 - 03.04.2012
What's the exact error?
Re: GetVehicleModel is an invalid function? -
freddy smyth - 03.04.2012
Are there any plugins associated with the page that you are using? Possibly the object streamer?
Re: GetVehicleModel is an invalid function? -
iLcke - 03.04.2012
@MP2, like I said, GetVehicleModel is 'invalid'.
Код:
C:\Users\Jack\Desktop\GTA\ASP\LSPD Training\gamemodes\pd.pwn(1295) : error 010: invalid function or declaration
@Freddy
Would object streamers really cause GetVehicleModel to act differently? Using fallout's streamer, and no other plugins.
Re: GetVehicleModel is an invalid function? -
MP2 - 03.04.2012
Show that line, the line above it and the line below it.
Re: GetVehicleModel is an invalid function? -
iLcke - 03.04.2012
pawn Код:
if(!IsPlayerInAnyVehicle(playerid))
SendErrorMessage(playerid, " You're not in a vehice.");
return 1;
}
if(GetVehicleModel(vehicleid) == 411) // 411 is the infernus model
{
SendClientMessage(playerid, 0xFFFFFFFF, "Nice Infernus!");
}
Nothing is below the GetVehicleModel.
Re: GetVehicleModel is an invalid function? - T0pAz - 03.04.2012
Show the
GetVehicleModel function(stock).
Re: GetVehicleModel is an invalid function? -
iLcke - 03.04.2012
Nevermind I got it.
I forgot a { under IsPlayerinAnyVehicle, along with getting the vehicle ID.
Re: GetVehicleModel is an invalid function? -
Jonny5 - 03.04.2012
pawn Код:
if(!IsPlayerInAnyVehicle(playerid))
{
SendErrorMessage(playerid, " You're not in a vehice.");
return 1;
}
if(GetVehicleModel(vehicleid) == 411) // 411 is the infernus model
{
SendClientMessage(playerid, 0xFFFFFFFF, "Nice Infernus!");
}
you where missing a {
Re: GetVehicleModel is an invalid function? -
MP2 - 03.04.2012
Indenting helps!