05.12.2016, 19:50
And if i want when player register get level 1?
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, ""COL_WHITE"Registering...",""COL_RED"Ai introdus o parola gresita.\n"COL_WHITE"Scrie o parola pentru a te inregistra.","Register","Quit");
new INI:File = INI_Open(UserPath(playerid));
GivePlayerMoney(playerid,10000);
SetSpawnInfo(playerid,0,PlayerInfo[playerid][pSkin],1283.5896,-1329.5938,13.3824,89.6460,0,0,0,0,0,0);
SetPlayerColor(playerid, 0xFFFFFFAA);
SpawnPlayer(playerid);
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Level",0);
INI_WriteInt(File,"Skin",0);
INI_WriteInt(File,"Kills",0);
INI_Close(File);
}
}