OnPlayerSpawn called twice?
#1





pawn Код:
public OnPlayerSpawn(playerid)
{
    Portal[playerid] = 1;
    PortalType[playerid] = 1;
    SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1);
    GivePlayerWeapon(playerid, 27, 99999);
    SendClientMessage(playerid, -1, "You've been given a Portal Gun.");
    print("OnPlayerSpawn called.");
    return 1;
}
NOTE: this is in a filterscript.
Reply
#2

Try using string to return the message?
Reply
#3

Quote:
Originally Posted by Laurey
Посмотреть сообщение
Try using string to return the message?
Wouldn't help.
Reply
#4

dont use SpawnPlayer() and TogglePlayerSpectating() together it is what cazes problem
+ show us ur OnPlayerResqestClass callback if the above method doesnt work
Reply
#5

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
dont use SpawnPlayer() and TogglePlayerSpectating() together it is what cazes problem
+ show us ur OnPlayerResqestClass callback if the above method doesnt work
I believe this is the issue, thanks for that catch.
Reply
#6

OnPlayerSpawn will only be called twice the first time you connect. I had the same problem, if what BroZeus didn't work try making a variable or something To count how many times you have spawned.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)