Vehicles Respawn/Crashes Question
#1

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?
Reply
#2

Use AddStaticVehicleEx if you want to choose the respawn time.
Reply
#3

And then? Show an example please because i dont know which part of code is respawn...
Reply
#4

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);
}
Reply
#5

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)] ++;
Reply
#6

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);
    }
Reply
#7

I have 572 vehicles 69 types...What about Respawn vehicles?
Reply
#8

https://sampwiki.blast.hk/wiki/AddStaticVehicleEx
Reply
#9

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


Forum Jump:


Users browsing this thread: 1 Guest(s)