[HELP] [b]Need to hide pickup for own team!![/B]
#1

URL = Removed (already fixed)
hi this is my gamemode but i have one problem
i got a flag system so each team can take his enemy's flag
but i want to hide the flagpickup for each own team
so if your the netherlands or whatever you cannot see youre own flag
i have tried many options but im getting bored of this cant fix it

can some1 help or make an example
or maybe say were to put it

if(gTeam[playerid] == TEAM_DUTCH)
DestroyPickup(PICKUPA);

if(gTeam[playerid] == TEAM_SOVIET)
DestroyPickup(PICKUPB);

if(gTeam[playerid] == TEAM_EUROPE)
DestroyPickup(PICKUPC);

if(gTeam[playerid] == TEAM_ARABIAN)
DestroyPickup(PICKUPD);

if(gTeam[playerid] == TEAM_USA)
DestroyPickup(PICKUPE);


ive tried many options but it wont help me out
wiki can't help me bekoz i dont know were to put it

very thanks ive someone response on this prob
soryy for my bad englisch!
ByeBye


dont steal my script i was made this not someone else!
ty btw
Reply
#2

Hope it works...
If you don't use a register/login system, do this;
pawn Код:
public OnPlayerConnect(playerid)
{
    if(gTeam[playerid] == TEAM_DUTCH) DestroyPickup(PICKUPA);
    else if(gTeam[playerid] == TEAM_SOVIET) DestroyPickup(PICKUPB);
    else if(gTeam[playerid] == TEAM_EUROPE) DestroyPickup(PICKUPC);
    else if(gTeam[playerid] == TEAM_ARABIAN) DestroyPickup(PICKUPD);
    else if(gTeam[playerid] == TEAM_USA) DestroyPickup(PICKUPE);
    return 1;
}
If so, then put it when player connects.
Reply
#3

DestroyPickup and CreatePickup are both global. If you Destroy/Create are pickup on player connect, it will show/destroy it for everyone in the server
Reply
#4

Quote:
Originally Posted by Jakku
Посмотреть сообщение
DestroyPickup and CreatePickup are both global. If you Destroy/Create are pickup on player connect, it will show/destroy it for everyone in the server
Yes,they are Global ...
You just can't,only if you play with the Virtual Worlds but that could fuck up your server
Reply
#5


all teams stills showing up
i putted this in
Quote:

public OnPlayerConnect(playerid)
{
if(gTeam[playerid] == TEAM_DUTCH) DestroyPickup(PICKUPA);
else if(gTeam[playerid] == TEAM_SOVIET) DestroyPickup(PICKUPB);
else if(gTeam[playerid] == TEAM_EUROPE) DestroyPickup(PICKUPC);
else if(gTeam[playerid] == TEAM_ARABIAN) DestroyPickup(PICKUPD);
else if(gTeam[playerid] == TEAM_USA) DestroyPickup(PICKUPE);
return 1;
}

hmmm destorypickup somewere else ??
Reply
#6

already fixed
i did this onplayerspawn
Quote:

}
if(GetPlayerTeam(playerid) == 1) {
DestroyPickup(PICKUPA);
}
if(GetPlayerTeam(playerid) == 2) {
DestroyPickup(PICKUPB);
}
if(GetPlayerTeam(playerid) == 3) {
DestroyPickup(PICKUPC);
}
if(GetPlayerTeam(playerid) == 4) {
DestroyPickup(PICKUPD);
}
if(GetPlayerTeam(playerid) == 5) {
DestroyPickup(PICKUPE);
}

close topic
Reply
#7

This wont work, as mentioned before.
You can only show a pickup for everyone, or for no one. The code will remove it for all players.

You will have to use objects / playerobjects if you want to show it only for specific players.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)