How to do this? -
Guitar - 25.08.2012
I've got this on "OnPlayerSpawn"
pawn Код:
if(PlayerInfo[playerid][pTeam] == 1)
{
SetPlayerPos(playerid, 403.6300,2533.5134,16.5457);
}
else if(PlayerInfo[playerid][pTeam] == 2)
{
SetPlayerPos(playerid, 214.4811,1863.2504,13.1406);
}
But it's not working, so how can I make it work?
============
EDIT:
Uhm, I have the HnRAvailable[playerid] = 1; in a command, and I want to force it on everyone when I type that command, what should I do?
I have it like HnRAvailable[targetid] = amount; .. So, I also have it in "OnPlayerConnect" and OnDialogResponse when a player registers even logs in.. But it doesn't work
Re: How to do this? -
Akira297 - 25.08.2012
How is it 'not' working, what do you mean?
+
Код:
SetCameraBehindPlayer(playerid);
Re: How to do this? -
Guitar - 25.08.2012
It doesn't read it I think.. I have a tp that sets the players to teams if they type it, but yeah .. It's not like working, everything works except this, I tried putting it in OnPlayerDeath, but nothing ..
Re: How to do this? -
clarencecuzz - 25.08.2012
Make sure it's not conflicting with another OnPlayerSpawn in another filterscript/gamemode.
Re: How to do this? -
FalconX - 25.08.2012
well sometimes you have set SetSpawnInfo in other place maybe in onplayerconnect or somewhere. Make sure if that isn't the problem
Re: How to do this? -
Guitar - 25.08.2012
Okay SetSpawnInfo works, thanks but now my question is:
Will the following code send the "HnRAvailable" for all the players on the server if I did it like that?
pawn Код:
for(new i=1; i<MAX_PLAYERS; i++)
{
HnRAvailable[i] = 1;
}
Or it's just fine as it is
pawn Код:
HnRAvailable[playerid] = 1;
?
Re: How to do this? -
clarencecuzz - 25.08.2012
It depends what function you're using it on. If you're using it on OnPlayerConnect, then yes it will work with HnRAvailable[playerid] = 1;
If you're using it in a completely different, or non-public function, then you will need to use:
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
HnRAvailable[i] = 1;
}
i = 0, because the server starts with ID 0 by default, not ID 1.
Re: How to do this? -
Guitar - 25.08.2012
Oh, alrighty! Thank you, then for my case it's [playerid] ^^
Re: How to do this? -
Guitar - 25.08.2012
Uhm, I have the HnRAvailable[playerid] = 1; in a command, and I want to force it on everyone when I type that command, what should I do?
Re: How to do this? -
Guitar - 26.08.2012
BUMP!