Vehicle spawning issue - 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: Vehicle spawning issue (
/showthread.php?tid=640987)
Vehicle spawning issue - adri[4]Life - 09.09.2017
Hello guys from a long time ago a bug of vehicle spawning appeared, I have no idea of the bug position
i've re written the vehicle spawning commands & deleted old functions But still the same, The problem is in lan mode i can spawn vehicles but not in the server the vehicle won't spawn (It works for minutes after last server restart then it doesn't). I've a cmd which shows how many vehicles spawned In lan mode: 233 In the server 1999.
I don't have any idea from where the bug came from but i am pretty sure the code should work perfectly
Here is a part of it:
Код:
CMD:dcar(playerid,params[])
{
if(pMode[playerid] != MODE_TDM) return SendClientMessage(playerid, COLOR_RED,"Error: You Cannot Use This CMD In This Mode !");
if(PlayerInfo[playerid][dRank] < 1) return SendClientMessage(playerid, COLOR_RED,"ERROR: You Need Atleast Donor Rank 1 To Use This Command");
if(pCMD[playerid][DCAR] > gettime()) return SendClientMessage(playerid, COLOR_RED,"ERROR: You have to wait 5 minutes!");
new Float:x,Float:y,Float:z;
if(PlayerInfo[playerid][pCar] != -1)
{
DestroyVehicle(PlayerInfo[playerid][pCar]);
GetPlayerPos(playerid,x,y,z);
PlayerInfo[playerid][pCar] = CreateVehicle(411, x,y,z, 90,-1,-1,-1);
PutPlayerInVehicle(playerid,PlayerInfo[playerid][pCar],0);
}
else
{
GetPlayerPos(playerid,x,y,z);
PlayerInfo[playerid][pCar] = CreateVehicle(411, x,y,z, 90,-1,-1,-1);
PutPlayerInVehicle(playerid,PlayerInfo[playerid][pCar],0);
}
SendClientMessage(playerid,COLOR_BLUE,"Car Spawned.");
pCMD[playerid][DCAR] = gettime() + 300;
SendCMDMessage(playerid,"DCAR");
return 1;
}
Maybe it came from plugins here is the list:
streamer
sscanf
Whirlpool
timerfix
crashdetect
Re: Vehicle spawning issue -
aoky - 09.09.2017
If it's working on LAN, which is Windows I'm guessing it, could mean:
Your .dll files are correct but your .so plugins for Linux might be the incorrect version.
This is just a guess.
Re: Vehicle spawning issue - adri[4]Life - 09.09.2017
Quote:
Originally Posted by aoky
If it's working on LAN, which is Windows I'm guessing it, could mean:
Your .dll files are correct but your .so plugins for Linux might be the incorrect version.
This is just a guess.
|
It works for minutes after last server restart but it stops working when more people use the vehicle spawning commands i think, It cannot reach 1999 vehicle cause each donor/staff ( just 30) can spawn 1 vehicle they cannot spawn more at same time.