help, I have problems with the "IsValidVehicle"
#1

The problem is that when I try it seems that the function does not return false but true, and does not allow things done.


if(dialogid == TC_DIALOG)
{
if(!response) return SendClientMessage(playerid, -1, "Se cancela venta.");
switch(listitem)
{
case 0:
{
if(gTeam[playerid] == TEAM_UNASUR)
{
for(new l = 0; l<MAX_VEHICLES; l++)
{
if(GetVehicleModel(uns[l]) == 470)
{
if(!IsValidVehicle(uns[l]))
{
SendClientMessage(playerid, -1, "No tiene espacio para este Vehiculo");
}
else
{
SendClientMessage(playerid, -1, "Vehiculo Comprado Exitosamente!");
}
}
}
}
}
}
}


Thanks!!! (y)
Reply
#2

You're forgetting else
Reply
#3

is there!!!
Reply
#4

What error?

You probably missed return 1; at end.
Reply
#5

Kinda pointless to put it there anyway; if GetVehicleModel doesn't return 470 the vehicle isn't valid anyway.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)