SA-MP Forums Archive
I need help .. Thanks in advance - 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)
+--- Thread: I need help .. Thanks in advance (/showthread.php?tid=421717)



I need help .. Thanks in advance - Jaber_Brown - 10.03.2013

I have this textdraw,



it appears in Onplayerrequestclass .. but I don't want that camera pisition (beach camera) I didn't even put it and I already got camera in Onplayerrequestclass, but the beach camera appears first, anyway to remove it ?


Re: I need help .. Thanks in advance - Denying - 10.03.2013

Change the camera position at OnPlayerRequestClass CallBack.

pawn Код:
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
EDIT: Sorry, I mistakenly coppied the SetPlayerPos line.


Re: I need help .. Thanks in advance - Jaber_Brown - 10.03.2013

Yeah , I don't have it already, I got custom random camera positions


Re: I need help .. Thanks in advance - Denying - 10.03.2013

May we see the OnPlayerRequestClass CallBack?


Re: I need help .. Thanks in advance - Jaber_Brown - 10.03.2013

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetTimerEx("ShowIntro", 0000, 0, "d", playerid); // THIS IS THE TEXTDRAW
    PlayerPlaySound(playerid, 1076, 0.0, 0.0, 0.0);
    if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
    {
        ClearChatbox(playerid, 10);
        SetPlayerInterior(playerid,0);
        LoginScreen(playerid);
        SetPlayerVirtualWorld(playerid,1);
        PlayerPlaySound(playerid, 1183, 0.0, 0.0, 0.0);
        Account[playerid][pInt] = 0;
        Header1[playerid] = TextDrawCreate(265.000000,115.000000,"Account");
        TextDrawAlignment(Header1[playerid],0);
        TextDrawBackgroundColor(Header1[playerid],0x000000ff);
        TextDrawFont(Header1[playerid],0);
        TextDrawLetterSize(Header1[playerid],1.000000,1.000000);
        TextDrawColor(Header1[playerid],0x00ffff66);
        TextDrawSetOutline(Header1[playerid],1);
        TextDrawSetProportional(Header1[playerid],1);
        TextDrawSetShadow(Header1[playerid],1);
        if(gPlayerAccount[playerid] == 1)
        {
            Login1[playerid] = TextDrawCreate(179.000000,124.000000,"~w~Welcome Back, in order to play just type ~r~/login [password]~w~~n~~n~If you need any information just visit ~g~http://evolution-gaming.co.uk");
            TextDrawUseBox(Login1[playerid],1);
            TextDrawBoxColor(Login1[playerid],0x00000066);
            TextDrawTextSize(Login1[playerid],480.000000,0.000000);
            TextDrawAlignment(Login1[playerid],0);
            TextDrawBackgroundColor(Login1[playerid],0x000000ff);
            TextDrawFont(Login1[playerid],1);
            TextDrawLetterSize(Login1[playerid],0.399999,1.000000);
            TextDrawColor(Login1[playerid],0xffffffff);
            TextDrawSetOutline(Login1[playerid],1);
            TextDrawSetProportional(Login1[playerid],1);
            TextDrawSetShadow(Login1[playerid],1);
            TextDrawShowForPlayer(playerid,Login1[playerid]);
            TextDrawShowForPlayer(playerid,Header1[playerid]);
            SetTimerEx("KickTimer",120000,0,"i",playerid);
        }
        else
        {
            Register1[playerid] = TextDrawCreate(179.000000,124.000000,"~w~Welcome, it seems that you are new here, type ~r~/register [password]~w~ that you want.~n~~n~If you need any information just visit ~g~http://evolution-gaming.co.uk");
            TextDrawUseBox(Register1[playerid],1);
            TextDrawBoxColor(Register1[playerid],0x00000066);
            TextDrawTextSize(Register1[playerid],480.000000,0.000000);
            TextDrawAlignment(Register1[playerid],0);
            TextDrawBackgroundColor(Register1[playerid],0x000000ff);
            TextDrawFont(Register1[playerid],1);
            TextDrawLetterSize(Register1[playerid],0.399999,1.000000);
            TextDrawColor(Register1[playerid],0xffffffff);
            TextDrawSetOutline(Register1[playerid],1);
            TextDrawSetProportional(Register1[playerid],1);
            TextDrawSetShadow(Register1[playerid],1);
            TextDrawShowForPlayer(playerid,Register1[playerid]);
            TextDrawShowForPlayer(playerid,Header1[playerid]);
            SpawnPlayer(playerid);
            //Kick(playerid);
        }
        SetPlayerTeamFromClass(playerid,classid);
    }
    else SpawnPlayer(playerid);
    return false;
}



Re: I need help .. Thanks in advance - Denying - 10.03.2013

I can not notice the camera set position and I think that the beach is the default(?). Try using the lines I gave you.


Re: I need help .. Thanks in advance - Jaber_Brown - 10.03.2013

I just tried it, Doesn't work, It shows the beach camera and then my random cameras


AW: I need help .. Thanks in advance - ulbi1990 - 10.03.2013

Search for SetPlayerCameraPos and SetPlayerCameraLookAt, bcz this aren't the default positions, default would be Missionary Hill in LS and not the LV Desert.

Also show us your timer callback.


Re: I need help .. Thanks in advance - Denying - 10.03.2013

I really don't know then.. sorry.


Re: I need help .. Thanks in advance - Bakr - 10.03.2013

That is the default location for when you are spectating someone and something else happens, like they leave the server.

As stated, create your own camera and player positions to make your own selection!
pawn Код:
SetPlayerPos(playerid, Float: x, Float: y, Float: z);
SetPlayerFacingAngle(playerid, Float: a);
SetPlayerCameraPos(playerid, Float: x, Float: y, Float: z);
SetPlayerCameraLookAt(playerid, Float: x, Float: y, Float: z);