04.04.2013, 17:13
(
Последний раз редактировалось Igi_Guduric; 04.04.2013 в 17:50.
)
Hello guys, but I have a little problem with the spawn and they can not do it because I need the server roleplay...
Sorry I bad english.
pawn Код:
switch(dialogid)
{
case DIALOG_REGISTER:
{
if(!response)return Kick(playerid);
if(response)
{
if(!strlen(inputtext))return ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD ,"Registracija ","Dobrodosli na South Style Roleplay server.\nVas profil ne postoji, molim da unesete vas password bi ste se registrovali.","Reg","Izadji");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"AdminLevel",0);
INI_WriteInt(File,"GameMaster",0);
INI_WriteInt(File,"Level",1);
INI_WriteInt(File,"Experian",0);
INI_WriteInt(File,"PlayedHours",0);
INI_WriteInt(File,"Account",0);
INI_WriteInt(File,"Donator",0);
INI_WriteInt(File,"Sex",0);
INI_WriteInt(File,"Age",0);
INI_WriteInt(File,"Origin",0);
INI_WriteInt(File,"Character",0);
INI_WriteInt(File,"Money",1000);
INI_WriteInt(File,"Job",0);
INI_WriteInt(File,"House",0);
INI_WriteInt(File,"Business",0);
INI_WriteInt(File,"Phone",0);
INI_WriteInt(File,"Phonebook",0);
INI_WriteInt(File,"Leader",0);
INI_WriteInt(File,"Member",0);
INI_WriteInt(File,"Rank",0);
INI_WriteInt(File,"Tutorial",0);
INI_Close(File);
SpawnPlayer(playerid);
}
}
}
switch(dialogid)
{
case DIALOG_LOGIN:
{
if(!response)return Kick(playerid);
if(response)
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPassword])
{
INI_ParseFile(UserPath(playerid),"LoadUser_%s",.bExtra = true,.extra = playerid);
GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
SetPlayerScore(playerid,PlayerInfo[playerid][pLevel]);
SpawnPlayer(playerid);
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Logiranje","Dobrodosli na South Style Roleplay server.\nVas profil postoji, molim da unesete vas password da bi ste se ulogovali.","Logiraj se","Izadji");
}
}
}
}
pawn Код:
public SetPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
SetPlayerSkin(playerid,PlayerInfo[playerid][pCharacter]);
if(PlayerInfo[playerid][pTutorial] == 0)
ShowPlayerDialog(playerid,DIALOG_SEX,DIALOG_STYLE_LIST,"Da li ste musko ili zensko?","Musko\nZensko","Izaberi","Izadji");
SetPlayerPos(playerid,330.6825,163.6688,1014.1875);
SetPlayerFacingAngle(playerid,280);
SetPlayerInterior(playerid,3);
TogglePlayerControllable(playerid,0);
RegistrationStep[playerid] = 1;
}
return 1;
}