Removing Spawn Buttons -
Alex_Valde - 14.10.2010
How can I remove these :
Re: Removing Spawn Buttons -
dillo1000 - 14.10.2010
Cant, I think its SAMP not your server so wont be able to get rid off
Re: Removing Spawn Buttons -
Scenario - 14.10.2010
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.
Re: Removing Spawn Buttons -
Alex_Valde - 14.10.2010
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
Re: Removing Spawn Buttons -
Scenario - 14.10.2010
Yeah... No problem. Feel free to edit this topic for more questions or visit the appropriate sections of the forum.
Re: Removing Spawn Buttons -
Alex_Valde - 14.10.2010
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?
Re: Removing Spawn Buttons -
Scenario - 14.10.2010
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)".
Re: Removing Spawn Buttons -
Alex_Valde - 14.10.2010
Quote:
Originally Posted by RealCop228
Add
pawn Код:
TogglePlayerSpectating(playerid, false);
above "SpawnPlayer(playerid)".
|
Nah it's not that...I still don't spawn
Re: Removing Spawn Buttons -
Scenario - 14.10.2010
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.
Re: Removing Spawn Buttons -
CaptainOwen - 14.10.2010
RealCop is a beast, lol. (No asslick intended).