Removing Spawn Buttons
#1

How can I remove these :

Reply
#2

Cant, I think its SAMP not your server so wont be able to get rid off
Reply
#3

When the player connects:

pawn Код:
TogglePlayerSpectating(playerid, true);
When the player logs in (or spawns):

pawn Код:
TogglePlayerSpectating(playerid, false);
Keep in mind this will by-pass the whole "class selection" screen so you will need to assign the skin to the player.
Reply
#4

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
When the player connects:

pawn Код:
TogglePlayerSpectating(playerid, true);
When the player logs in (or spawns):

pawn Код:
TogglePlayerSpectating(playerid, false);
Keep in mind this will by-pass the whole "class selection" screen so you will need to assign the skin to the player.
THANK YOU!!
Thats what I've been looking for
Reply
#5

Yeah... No problem. Feel free to edit this topic for more questions or visit the appropriate sections of the forum.
Reply
#6

I got one more question.
I made a dialog when player connects on server.
pawn Код:
if(!fexist(file))
    {
        new playernamesplit[3][MAX_PLAYER_NAME];
        split(GetName(playerid), playernamesplit, '_');
       
        format (string, sizeof(string), " Welcome to Razer Roleplay %s,\n\nTo register Your account please write your password bellow.\n\n[HINT]:You will be automatically loged in.",playernamesplit[0]);
        ShowPlayerDialog(playerid, REG_DIALOG,DIALOG_STYLE_INPUT, "[SYSTEM]: Not Registered!", string, "Register","Cancel");
    }
this is when player responds
pawn Код:
if(dialogid ==REG_DIALOG)
    {
        if(!response) return SendClientMessage(playerid, COLOR_LIGHTRED, " You Canceled!");

        new file[128];
        format(file, sizeof(file), "/Accounts/%s.ini", UnderscoreToSpaceName(playerid));
        if(!fexist(file))
        {
            if(strlen(inputtext) >= 1)
                {
                    RegisterPlayer( playerid, inputtext);
                }
            else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "Must be longer than 1 char." );
                }
        }
            else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "Your account already exists." );
                }
    }
And this is Register player variable...
pawn Код:
if(!fexist(file))
    {
        MaxRegistered++;
        dini_Create(file);
        dini_Set(file, "Password", password);
        format( Player[playerid][Password], 128, "%s", password);
......
SpawnPlayer(playerid); // and here is the problem

Problem is that player doesn't spawns after registering but I need to press >>Shift<< to spawn player...
Why is that? if you know?
Reply
#7

Quote:
Originally Posted by Alex_Valde
Посмотреть сообщение
I got one more question.
I made a dialog when player connects on server.
pawn Код:
if(!fexist(file))
    {
        new playernamesplit[3][MAX_PLAYER_NAME];
        split(GetName(playerid), playernamesplit, '_');
       
        format (string, sizeof(string), " Welcome to Razer Roleplay %s,\n\nTo register Your account please write your password bellow.\n\n[HINT]:You will be automatically loged in.",playernamesplit[0]);
        ShowPlayerDialog(playerid, REG_DIALOG,DIALOG_STYLE_INPUT, "[SYSTEM]: Not Registered!", string, "Register","Cancel");
    }
this is when player responds
pawn Код:
if(dialogid ==REG_DIALOG)
    {
        if(!response) return SendClientMessage(playerid, COLOR_LIGHTRED, " You Canceled!");

        new file[128];
        format(file, sizeof(file), "/Accounts/%s.ini", UnderscoreToSpaceName(playerid));
        if(!fexist(file))
        {
            if(strlen(inputtext) >= 1)
                {
                    RegisterPlayer( playerid, inputtext);
                }
            else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "Must be longer than 1 char." );
                }
        }
            else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "Your account already exists." );
                }
    }
And this is Register player variable...
pawn Код:
if(!fexist(file))
    {
        MaxRegistered++;
        dini_Create(file);
        dini_Set(file, "Password", password);
        format( Player[playerid][Password], 128, "%s", password);
......
SpawnPlayer(playerid); // and here is the problem

Problem is that player doesn't spawns after registering but I need to press >>Shift<< to spawn player...
Why is that? if you know?
Add

pawn Код:
TogglePlayerSpectating(playerid, false);
above "SpawnPlayer(playerid)".
Reply
#8

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

pawn Код:
TogglePlayerSpectating(playerid, false);
above "SpawnPlayer(playerid)".
Nah it's not that...I still don't spawn
Reply
#9

Quote:
Originally Posted by Alex_Valde
Посмотреть сообщение
Nah it's not that...I still don't spawn
Okay, use "SetSpawnInfo(...);" and fill it in with the necessary variables.
Reply
#10

RealCop is a beast, lol. (No asslick intended).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)