SA-MP Forums Archive
Solved - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Solved (/showthread.php?tid=90521)



Solved - TheKingWillem - 08.08.2009

You may delete this, i got helped by a kind person mademan..


Re: [HELP]What is the problem? - TheKingWillem - 08.08.2009

Somebody? cause i really can't figure it out..


Re: [HELP]What is the problem? - Chrham_2 - 08.08.2009

It's nothing with your server, because F4 is client-sided, so its a client bug.
Or, check your spectating function to make sure that doesn't automatically
respawns you.


Re: [HELP]What is the problem? - TheKingWillem - 08.08.2009

Well when i press f4 it won't got to class selection... I really don't know what i've did wrong, can you be a bit more specific on the spectating function thing?


Re: [HELP]What is the problem? - TheKingWillem - 09.08.2009

Bump....


Re: [HELP]What is the problem? - TheKingWillem - 10.08.2009

Another bump..


Re: [HELP]What is the problem? - MadeMan - 10.08.2009

If you don't go to class selection, where do you go then?


Re: [HELP]What is the problem? - TheKingWillem - 10.08.2009

It spectates someone, and if you die it doesn't show the death animation as well, i mean the camera flying above him thing. It just goes to spectating at a flash.


Re: [HELP]What is the problem? - MadeMan - 10.08.2009

pawn Код:
new Killed[MAX_PLAYERS];


public OnGameModeInit()
{
    Textdraw0 = TextDrawCreate(176.000000,390.000000,"Spectating, respawn in 10 seconds");
    TextDrawAlignment(Textdraw0,0);
    TextDrawBackgroundColor(Textdraw0,0x000000ff);
    TextDrawFont(Textdraw0,3);
    TextDrawLetterSize(Textdraw0,0.499999,0.799999);
    TextDrawColor(Textdraw0,0xffffff99);
    TextDrawSetOutline(Textdraw0,1);
    TextDrawSetProportional(Textdraw0,1);
    TextDrawSetShadow(Textdraw0,1);
}


public OnPlayerRequestClass(playerid, classid)
{
    Killed[playerid] = -1;
}

public OnPlayerSpawn(playerid)
{
    if(Killed[playerid] != -1)
    {
        TextDrawShowForPlayer (playerid, Textdraw0);
        TogglePlayerSpectating(playerid, 1);
        SetTimerEx("StopSpeccing", 10000, false, "i", playerid);
        if(Killed[playerid] != INVALID_PLAYER_ID)
        {
            PlayerSpectatePlayer(playerid, Killed[playerid]);
        }
        else
        {
            PlayerSpectatePlayer(playerid, GetRandomID());
            if (IsPlayerInAnyVehicle(GetRandomID())) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(GetRandomID()));
        }
    }
}

public OnPlayerDeath(playerid, killerid, reason)

{
    Killed[playerid] = killerid;
    if(killerid == INVALID_PLAYER_ID) {
    SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);



  } else {



    if(gTeam[killerid] != gTeam[playerid]) {

     // Valid kill

     SendDeathMessage(killerid,playerid,reason);

     SetPlayerScore(killerid,GetPlayerScore(killerid)+1);

     GivePlayerMoney(killerid, 1000);


}

  }

  return 1;

}



Re: [HELP]What is the problem? - TheKingWillem - 10.08.2009

Now if you suicide it doesn't respawn at all..

EDIT: It also doesn't respawn if somebody killed you, the spectate thing works fine, but it doesn't respawn. After 10 seconds you'll see a flash or something, it looks like its wanting to respawn but cant. it also doesn't show the textdraw.