help, I have problems with the "IsValidVehicle" - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help, I have problems with the "IsValidVehicle" (
/showthread.php?tid=508816)
help, I have problems with the "IsValidVehicle" -
wolfrex2809 - 24.04.2014
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)
Re: help, I have problems with the "IsValidVehicle" -
Onfroi - 24.04.2014
You're forgetting
else
Respuesta: Re: help, I have problems with the "IsValidVehicle" -
wolfrex2809 - 24.04.2014
is there!!!
Re: help, I have problems with the "IsValidVehicle" -
Bingo - 24.04.2014
What error?
You probably missed
return 1; at end.
Re: help, I have problems with the "IsValidVehicle" -
Vince - 24.04.2014
Kinda pointless to put it there anyway; if GetVehicleModel doesn't return 470 the vehicle isn't valid anyway.