14.10.2010, 17:08
How can I remove these :
TogglePlayerSpectating(playerid, true);
TogglePlayerSpectating(playerid, false);
When the player connects:
pawn Код:
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");
}
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." );
}
}
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
I got one more question.
I made a dialog when player connects on server. pawn Код:
pawn Код:
pawn Код:
Problem is that player doesn't spawns after registering but I need to press >>Shift<< to spawn player... Why is that? if you know? |
TogglePlayerSpectating(playerid, false);