SA-MP Forums Archive
Automaticaly spawn after login - 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: Automaticaly spawn after login (/showthread.php?tid=316802)



Automaticaly spawn after login - ArmyOps - 08.02.2012

Actualy i have more then 1 question, but i can only choose 1 Title...

Starting of main question:

(SOLVED) 1.) I'm useing Blank MySQL Gamemode by Markx but after register it oredring to "spawn". How can i make it automaticaly spawn without hiting the "Spawn" button below.
Added:
pawn Код:
SetSpawnInfo( playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
SpawnPlayer(playerid);
at the end of "stock MySQL_Login(playerid)"

(SOLVED) 2.) I want to clear "<" ">" "Spawn" buttons from login screen. Have seen that many Gamemodes dont have it.

Added
Код:
TogglePlayerSpectating(playerid,1);
Under OnPlayerConnect


3.) How can i send login dialog after player have registed account?


Re: Automaticaly spawn after login - Nonameman - 08.02.2012

I'm working on it, wait a bit, please.


Re: Automaticaly spawn after login - ArmyOps - 08.02.2012

Take ur time


Re: Automaticaly spawn after login - milanosie - 08.02.2012

its very easy, toggleplayerspectating itself on playerspawn,

Then set a timerat a few miliseconds, there Turn toggleplayerspectating to false,


Re: Automaticaly spawn after login - Nonameman - 08.02.2012

Sorry, forget this solving.


Re: Automaticaly spawn after login - ArmyOps - 08.02.2012

Nonameman idk what you actualy changed there, but no new effects in there. Probaly it didnt worked out.


Re: Automaticaly spawn after login - ArmyOps - 08.02.2012

Quote:
Originally Posted by milanosie
Посмотреть сообщение
its very easy, toggleplayerspectating itself on playerspawn,

Then set a timerat a few miliseconds, there Turn toggleplayerspectating to false,
BUMP:

Can u actualy tell me more how it works and how to set it up?
I got removed Spawn button, but now i need to make it automaticaly spawned somewhere if succefully logged in.


Re: Automaticaly spawn after login - MP2 - 08.02.2012

To have a 'login screen' do like so:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    TogglePlayerSpectating(playerid, true);
    SetTimerEx("login_cam_timer", 100, 0, "i", playerid);
    return 1;
}

forward login_cam_timer(playerid);
public login_cam_timer(playerid)
{
    // Set the camera.
    SetPlayerCameraPos(playerid, x, y, z);
    SetPlayerCameraLookAt(playerid, x, y, z);
   
    // Show dialogs HERE. Not before, not after.

    return 1;
}

// On login:
TogglePlayerSpectating(playerid, false);



Re: Automaticaly spawn after login - Nonameman - 08.02.2012

I put SpawnPlayer() function to the bottom of the script, thought it will spawn the player after login dialog get closed. The other thing I did was on the top of it, I commented out some lines, I thought you want the information dialog (just after login dialog) to be inactive.

Sorry for it, I misunderstood a part of changes you want. :/


Re: Automaticaly spawn after login - milanosie - 08.02.2012

Quote:
Originally Posted by ArmyOps
Посмотреть сообщение
BUMP:

Can u actualy tell me more how it works and how to set it up?
I got removed Spawn button, but now i need to make it automaticaly spawned somewhere if succefully logged in.
OnPlayerRequestClass

SEt a timer for 50 miliseconds there

On the timer callback:

TogglePlayerSpecating playerid true

Set a timer for 5 secodns,


on the callback
toggleplayerspectating playerid false



Now code it urself