Setplayerspec/SpawnPlayer once, OnPlayerSpawn being called twice. [REP++]
#1

Been bothering me for a while, the way I handle peoples weapons and such it doesn't usually bother me but people have been managing to double their ammo by repeatedly logging in/out.

So my question is, why under the circumstances that I toggleplayerspec when they requestclass, show a dialog, then spawn them after the dialog, that they'd spawn twice?
Reply
#2

We are not magician's, give us some code that u think that is wrong or that the bug is there.
Reply
#3

Alright my new problem I found after fixing this is: If I don't SpawnPlayer() after I TogglePlayerSpectating(), they get kicked, but if I do this, they spawn twice essentially, with double the ammo they should have.

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    TogglePlayerSpectating(playerid,1);
....
        ShowPlayerDialog()
pawn Код:
if(response)
        {
        TogglePlayerSpectating(playerid,0);
        SpawnPlayer(playerid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)