Spawning isn't working?
#1

For some reason, after I login to my new script/server, it'll just make the dialog disappear, and not spawn my character.
Part of the code where it spawnsplayer;
pawn Код:
new string[64];
        format(string, sizeof(string), "~w~Welcome ~n~~y~   %s",GetPlayerNameEx(playerid));
        GameTextForPlayer(playerid, string, 3500, 1);
        format(string, sizeof(string), "SERVER: Welcome %s",GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_WHITE, string);
        SpawnPlayer(playerid);
        gPlayerLogged[playerid] = 1;
OnPlayerSpawn:
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][pSpawnPoint] == 0)
    {
    Wounded[playerid] = 0;
    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
    SetPlayerPos(playerid,1742.8767,-1863.5521,13.5749);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerInterior(playerid, 0);
    SetPlayerFacingAngle(playerid,0);
    SetPlayerHealth(playerid,100);
    gPlayerLogged[playerid] = 1;
    }
    return 1;
}
What's wrong? I honestly do not know.
Reply
#2

Well does your player's spawn point equal 0?
Reply
#3

Yeah, you know when you join a server it shows the two arrows and the spawn button? When a player logs in, it should automatically spawn them, yet I have to hit the spawn button.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)