Zombie have Weapons o.O
#1

Sometimes, when on my Server, a Zombie killed a Human, the Human is then a Zombie, but sometimes he spawn with Weapons. It is a SAMP Bug or a Bug in the Script?
Reply
#2

Bug in the script. Make sure you don't give them any weapons in AddPlayerClass,
and you set the zome variable before spawn.
Reply
#3

no ,its a Bug in your script
Reply
#4

@irinel I am sure that i have the Zombie dont give a Weapon in AddPlayerClass. And the Bug is only sometimes. And on OnPlayerSpawn i have remove the Weapons with "ResetPlayerWeapons".


AddPlayerClass(230,0.0,0.0,0.0,0.0,0,0,0,0,0,0);
AddPlayerClass(137,0.0,0.0,0.0,0.0,0,0,0,0,0,0);
AddPlayerClass(162,0.0,0.0,0.0,0.0,0,0,0,0,0,0);
Reply
#5

Well, if it is a bug in your script which you believe it is, you could create a timer for every 3-5 seconds that if a player is a zombie it will remove their weapon(s) rather than battling with your script to find such a bug.
Reply
#6

May I see your OnPlayerSpawn, please?
Reply
#7

He the OnPlayerSpawn for Zombies:

case TEAM_ZOMBIE:
{
new rand = random(sizeof(RandomZombie));
SetPlayerPos(playerid,RandomZombie[rand][0],RandomZombie[rand][1],RandomZombie[rand][2]);
SetPlayerCheckpoint(playerid,RandomArmy[0][0],RandomArmy[0][1],RandomArmy[0][2],5.0);
SetPlayerColor(playerid,hellgrьn);
SetPlayerHealth(playerid,200.0);
SetPlayerTeam(playerid,1);
SetPlayerWeather(playerid,-19);
if(GetPVarInt(playerid,"DEAD") == 1)
{
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid,159);
TogglePlayerControllable(playerid,0);
TogglePlayerControllable(playerid,1);
SetPVarInt(playerid,"DEAD",0);
}
Reply
#8

Well, perhaps you should try putting your ResetPlayerWeapons up above the if statement for "DEAD."
Reply
#9

Quote:
Originally Posted by nmader
Посмотреть сообщение
Well, perhaps you should try putting your ResetPlayerWeapons up above the if statement for "DEAD."
So i have it now make, i hope the Bug is now away.
Reply
#10

Quote:
Originally Posted by nmader
Посмотреть сообщение
Well, perhaps you should try putting your ResetPlayerWeapons up above the if statement for "DEAD."
I have it now tested, and it works, thank you.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)