14.10.2009, 02:35
Hi everybody:
I made for my TDM Server a script that when you take a pickup the zone changes the color to the gang you're in.
It works perfect but the problem right now is, for example Killers have taken over the Workers zone and a new Player Joins the server and selects Workers, the gang zone changes the color to Workers again like it was in the begging, so the killers have to get the pick up again to change it to their color.
I made it with GangzoneShowForAll otherwise it would show for one player only in the team, here is the code to understand it better.
Thats under on player spawn
Thats under onplayerpickup
What i want is that when a player spawns the zone stays the same color as it as taken from the killers
If somebody could help me out would be very nice
Thanks
I made for my TDM Server a script that when you take a pickup the zone changes the color to the gang you're in.
It works perfect but the problem right now is, for example Killers have taken over the Workers zone and a new Player Joins the server and selects Workers, the gang zone changes the color to Workers again like it was in the begging, so the killers have to get the pick up again to change it to their color.
I made it with GangzoneShowForAll otherwise it would show for one player only in the team, here is the code to understand it better.
Thats under on player spawn
Code:
public OnPlayerSpawn(playerid){ if(gTeam[playerid] == TEAM_TRABAJADORES) { GangZoneShowForAll(Trabajadores,COLOR_GREEN); SetPlayerColor(playerid,COLOR_GREEN); // GREEN GivePlayerWeapon(playerid, 6,1); GivePlayerWeapon(playerid, 22,250); GivePlayerWeapon(playerid, 25,250); GivePlayerWeapon(playerid, 32,450); GivePlayerWeapon(playerid, 30,250); } else if(gTeam[playerid] == TEAM_EMPRESARIOS) { GangZoneShowForAll(Empresarios,COLOR_PURPLE); SetPlayerColor(playerid,COLOR_PURPLE); // PURPLE GivePlayerWeapon(playerid, 2,1); GivePlayerWeapon(playerid, 23,250); GivePlayerWeapon(playerid, 25,250); GivePlayerWeapon(playerid, 28,450); GivePlayerWeapon(playerid, 30,250); } return 1;}
Code:
public OnPlayerPickUpPickup(playerid, pickupid) { if (pickupid == zonatrabaj && gTeam[playerid] == TEAM_TRABAJADORES){ GangZoneShowForAll(Trabajadores,COLOR_GREEN); } if (pickupid == zonatrabaj && gTeam[playerid] == TEAM_EMPRESARIOS){ GangZoneShowForAll(Trabajadores,COLOR_PURPLE); } return 1; }
If somebody could help me out would be very nice
Thanks