Weird Warning(game) - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Weird Warning(game) (
/showthread.php?tid=132271)
Weird Warning(game) -
Chrham_2 - 07.03.2010
Hello..
EVERY time i explode my player owned car, I get three warnings.
Is there a way to remove them with #pragma?
my OnVehicleDeath:
pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
new i;
for(i=0; i<MAX_PLAYERS; i++)
{
if (IsPlayerInVehicle(i,Carlist[i][Carid]))
{
Carlist[i][Typ]=-1; Carlist[i][X]=0.0; Carlist[i][Y]=0.0; Carlist[i][Z]=0.0;
Carlist[i][Rotation]=0.0; Carlist[i][Status]=0; Carlist[i][Lock]=0; Carlist[i][Carid]=-1;
Carlist[i][Color1]=-1; Carlist[i][Color2]=-1; Carlist[i][mod1]=-1; Carlist[i][mod2]=-1;
Carlist[i][mod3]=-1; Carlist[i][mod4]=-1; Carlist[i][mod5]=-1; Carlist[i][mod6]=-1;
Carlist[i][mod7]=-1; Carlist[i][mod8]=-1; Carlist[i][mod9]=-1; Carlist[i][mod10]=-1;
Carlist[i][mod11]=-1; Carlist[i][mod12]=-1; Carlist[i][mod13]=-1; Carlist[i][mod14]=-1;
Carlist[i][mod15]=-1; Carlist[i][mod16]=-1; Carlist[i][mod17]=-1; Carlist[i][Paintjob]=-1;
SendClientMessage(i, COLOR_RED, "Your car has exploded, and you have lost your car!");
}
else
{
return 1;
}
return 1;
}
return 1;
}
I have no idea why I have to return 1; three times.. but I have to, orelse it dont work.
Here is also a Screenshot: