14.11.2018, 12:39
Quote:
|
you have to put something like this method
PHP код:
|
I've tried that code but didnt work (ERROR). so what must i do?
Quote:
|
public OnPlayerConnect(playerid) { new sdialog[128], rdialog[128]; if(!IsValidName(playerid)) return Kick(playerid); SetPlayerColor(playerid, -1); GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16); if(fexist(UserPath(playerid))) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); format(sdialog, sizeof(sdialog), "Welcome back, %s\n\n If you wish to login, please enter your password below.", GetName(playerid)); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login", sdialog, "Login","Quit"); } else { FirstSpawn[playerid] = 1; format(rdialog, sizeof(rdialog), "Name: %s\n\n Enter your desired password below to register!", GetName(playerid)); ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register", rdialog ,"Register","Quit"); } return 1; } |
Quote:
|
public OnPlayerSpawn(playerid) { if(FirstSpawn[playerid] == 1) { FirstSpawn[playerid] = 0; SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]); SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]); } else { SetPlayerPos(playerid, PlayerInfo[playerid][posX], PlayerInfo[playerid][posY], PlayerInfo[playerid][posZ]); SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); SetPlayerFacingAngle(playerid, PlayerInfo[playerid][posA]); SetPlayerInterior(playerid, PlayerInfo[playerid][pInterior]); SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVW]); SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]); SetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]); GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]); } return 1; } |


