Posts: 1,409
Threads: 376
Joined: Apr 2012
Reputation:
0
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?
Posts: 1,469
Threads: 62
Joined: Jan 2010
Reputation:
0
Bug in the script. Make sure you don't give them any weapons in AddPlayerClass,
and you set the zome variable before spawn.
no ,its a Bug in your script
Posts: 1,409
Threads: 376
Joined: Apr 2012
Reputation:
0
@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);
Posts: 639
Threads: 92
Joined: Jul 2011
Reputation:
0
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.
Posts: 1,469
Threads: 62
Joined: Jan 2010
Reputation:
0
May I see your OnPlayerSpawn, please?
Posts: 1,409
Threads: 376
Joined: Apr 2012
Reputation:
0
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);
}
Posts: 639
Threads: 92
Joined: Jul 2011
Reputation:
0
Well, perhaps you should try putting your ResetPlayerWeapons up above the if statement for "DEAD."