Vehicles Respawn/Crashes Question - 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: Vehicles Respawn/Crashes Question (
/showthread.php?tid=74932)
Vehicles Respawn/Crashes Question -
YamahaYZ - 27.04.2009
1. Hi.If i have about 450 vehicles on my GM, is possible way to crash players?I think vehicles crashes players...How to prevent possibly crashes by vehicles?
2. Which part of line
Код:
AddStaticVehicle(468,-509.6595,-185.9860,77.4749,355.9821,3,3); //
is responsible for respawn vehicle?
Re: Vehicles Respawn/Crashes Question -
MenaceX^ - 27.04.2009
Use AddStaticVehicleEx if you want to choose the respawn time.
Re: Vehicles Respawn/Crashes Question -
YamahaYZ - 27.04.2009
And then? Show an example please

because i dont know which part of code is respawn...
Re: Vehicles Respawn/Crashes Question -
Joe Staff - 27.04.2009
Having over 700 vehicles and over 128 vehicle types causes crashes.
Add this command to find out how many vehicles/types your server has
pawn Код:
if(strcmp(cmdtext,"/checkvehicles",true)==0)
{
new tmp,tmp2[212];
for(new i; i<MAX_VEHICLES;i++)
{
if(GetVehicleModel(i))
{
tmp++;
tmp[GetVehicleModel(i)]++;
}
}
new tmp3;
for(new i; i<212;i++)if(tmp2[i])tmp3++;
format(tmp2,sizeof(tmp2),"%d vehicles -- %d vehicle types.",tmp,tmp3);
return SendClientMessage(playerid,0xFF0000FF,tmp2);
}
Re: Vehicles Respawn/Crashes Question -
Andom - 27.04.2009
Quote:
Originally Posted by SilentHuntR
Having over 700 vehicles and over 128 vehicle types causes crashes.
Add this command to find out how many vehicles/types your server has
pawn Код:
if(strcmp(cmdtext,"/checkvehicles",true)==0) { new tmp,tmp2[212]; for(new i; i<MAX_VEHICLES;i++) { if(GetVehicleModel(i)) { tmp++; tmp[GetVehicleModel(i)]++; } } new tmp3; for(new i; i<212;i++)if(tmp2[i])tmp3++; format(tmp2,sizeof(tmp2),"%d vehicles -- %d vehicle types.",tmp,tmp3); return SendClientMessage(playerid,0xFF0000FF,tmp2); }
|
Quote:
C:\Documents and Settings\Danny\Bureaublad\Freeroam\gamemodes\freer oam.pwn(1023) : error 028: invalid subscript (not an array or too many subscripts): "tmp"
C:\Documents and Settings\Danny\Bureaublad\Freeroam\gamemodes\freer oam.pwn(1023) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Danny\Bureaublad\Freeroam\gamemodes\freer oam.pwn(1023) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Danny\Bureaublad\Freeroam\gamemodes\freer oam.pwn(1023) : fatal error 107: too many error messages on one line
|
Line 1023:
pawn Код:
tmp[GetVehicleModel(i)] ++;
Re: Vehicles Respawn/Crashes Question -
Joe Staff - 27.04.2009
pawn Код:
if(strcmp(cmdtext,"/checkvehicles",true)==0)
{
new tmp,tmp2[213];
for(new i; i<MAX_VEHICLES;i++)
{
if(GetVehicleModel(i))
{
tmp++;
tmp2[GetVehicleModel(i)-400]++;
}
}
new tmp3;
for(new i; i<213;i++)if(tmp2[i])tmp3++;
format(tmp2,sizeof(tmp2),"%d vehicles -- %d vehicle types.",tmp,tmp3);
return SendClientMessage(playerid,0xFF0000FF,tmp2);
}
Re: Vehicles Respawn/Crashes Question -
YamahaYZ - 27.04.2009
I have 572 vehicles 69 types...What about Respawn vehicles?
Re: Vehicles Respawn/Crashes Question -
[eLg]Timmy - 27.04.2009
https://sampwiki.blast.hk/wiki/AddStaticVehicleEx
Re: Vehicles Respawn/Crashes Question -
YamahaYZ - 28.04.2009
Thanks for help

if i have that amount of vehicles there is no possible way to crash players by vehicles??