Need help :( - 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: Need help :( (
/showthread.php?tid=230989)
Need help :( -
Randomai - 24.02.2011
Hello.Im making zombie server.first everyone spawn as humans, but after 30 seconds someone got randomly infected and becomes zombie.how i can do that someone randomly changes team to ZOMBIE_TEAM?can anyone help me?
here is some things u may need:
Код:
#define TEAM_HUMAN 0
#define TEAM_ZOMBIE 1
Код:
if(PlayerTeam[playerid] == 1) // ZOMBIE TEAM = 0
Re: Need help :( -
Ironboy - 24.02.2011
may be this will help you
https://sampwiki.blast.hk/wiki/PAWN_tutorial
Re: Need help :( -
maramizo - 24.02.2011
Use foreach.
pawn Код:
forward RandomZombie(MAX_PLAYERS);
pawn Код:
public OnGameModeInit()
{
SetTimer(RandomZombie, 30000, false);
return 1;
}
pawn Код:
public RandomZombie(playerid)
{
new randomplayer = Iter_Random(Player);
PlayerTeam[randomplayer] = 0;
SendClientMessage(randomplayer,0x00FF22,"ZOMBIEKING : I have chosen you to be my zombie!");
return 1;
}
Re: Need help :( -
maramizo - 24.02.2011
So... Did it work?
Re: Need help :( -
Randomai - 24.02.2011
trying tomorrow, thanks..i tried thing like that but i failed...let see if that works
Re: Need help :( -
maramizo - 24.02.2011
Nah I'm immune to failing.