05.12.2012, 15:03
eu escolho minha org exemplo amigos dos amigos й nгo sou setado :S
pawn Код:
public OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][CV] >= 1)
{
//COMPLEXO DO ALEMГO
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2660.4978,881.9752,79.7738);
GameTextForPlayer(playerid,"~r~COMPLEXO DO ALEMAO", 1000,1);
SetPlayerColor(playerid, COR_CV);
SetPlayerSkin(playerid, 107);
GivePlayerWeapon(playerid,6,9999);//PБ
GivePlayerWeapon(playerid,24,20);//DESERT EAGLE
GivePlayerWeapon(playerid,27,50);//COMBAT SHOTGUN
GivePlayerWeapon(playerid,31,80);//M4
GivePlayerWeapon(playerid,0,1);//MГO
SetPlayerHealth(playerid, 100.0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid,1);
}
if(PlayerInfo[playerid][TCP] >= 2)
{
//FAZENDINHA
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2610.4978,881.9752,79.7738);
GameTextForPlayer(playerid,"~b~FAZENDINHA", 1000,1);
SetPlayerColor(playerid, COR_TCP);
SetPlayerSkin(playerid, 107);
GivePlayerWeapon(playerid,6,9999);//PБ
GivePlayerWeapon(playerid,24,20);//DESERT EAGLE
GivePlayerWeapon(playerid,27,50);//COMBAT SHOTGUN
GivePlayerWeapon(playerid,31,80);//M4
GivePlayerWeapon(playerid,0,1);//MГO
SetPlayerHealth(playerid, 100.0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid,1);
}
if(PlayerInfo[playerid][ADA] >= 3)
{
//ROCINHA
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2620.4978,881.9752,79.7738);
GameTextForPlayer(playerid,"~y~ROCINHA", 1000,1);
SetPlayerColor(playerid, COR_ADA);
SetPlayerSkin(playerid, 107);
GivePlayerWeapon(playerid,6,9999);//PБ
GivePlayerWeapon(playerid,24,20);//DESERT EAGLE
GivePlayerWeapon(playerid,27,50);//COMBAT SHOTGUN
GivePlayerWeapon(playerid,31,80);//M4
GivePlayerWeapon(playerid,0,1);//MГO
SetPlayerHealth(playerid, 100.0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid,1);
}
if(PlayerInfo[playerid][PCC] >= 4)
{
//PARAISOPOLIS
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-2630.4978,881.9752,79.7738);
GameTextForPlayer(playerid,"~r~PARAISOPOLIS", 1000,1);
SetPlayerColor(playerid, COR_PCC);
SetPlayerSkin(playerid, 107);
GivePlayerWeapon(playerid,6,9999);//PБ
GivePlayerWeapon(playerid,24,20);//DESERT EAGLE
GivePlayerWeapon(playerid,27,50);//COMBAT SHOTGUN
GivePlayerWeapon(playerid,31,80);//M4
GivePlayerWeapon(playerid,0,1);//MГO
SetPlayerHealth(playerid, 100.0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid,1);
}
return 0;
}
// -----------------------------------------------------------------------------
if(dialogid == REGISTRO)
{
if(response)
{
if(!strlen(inputtext))
{
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[100];
format(String, sizeof(String), "{058AFF}Nick: {1E90FF}%s {FF0000}nгo registrado\n\n{FFFFFF} Digite Uma Senha Para Continuar", Nome);
ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
SendClientMessage(playerid,0x1E90FFAA,"Senha invalida, digite uma senha vбlida");
return 1;
}
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
format(file, sizeof(file), "Contas/%s.ini", Nome);
dini_Create(file);
dini_IntSet(file, "Password", udb_hash(inputtext));
dini_Set(file,"Senha",inputtext);
dini_IntSet(file,"Level",PlayerInfo[playerid][Admin] = 0);
dini_IntSet(file,"BOPELevel",PlayerInfo[playerid][BOPE] = 0);
dini_IntSet(file,"CVLevel",PlayerInfo[playerid][CV] = 0);
dini_IntSet(file,"TCPLevel",PlayerInfo[playerid][TCP] = 0);
dini_IntSet(file,"ADALevel",PlayerInfo[playerid][CV] = 0);
dini_IntSet(file,"PCCLevel",PlayerInfo[playerid][PCC] = 0);
dini_IntSet(file,"CARGOFACCAO",PlayerInfo[playerid][CARGOFACCAO] = 0);
dini_IntSet(file,"Dinheiro",0);
dini_IntSet(file,"Matou",0);
dini_IntSet(file,"Morreu",0);
dini_IntSet(file,"Logou",0);
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", "{1E90FF}Pronto vocк se registrou agora digite uma senha para continuar-Se", "Logar", "Cancelar");
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Vocк foi kickado porque nгo quis se registrar !");
Kick(playerid);
return 1;
}
}
if(dialogid == LOGIN)
{
if(response)
{
if(!strlen(inputtext))
{
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, sizeof(Nome));
new String[100];
format(String, sizeof(String), "{058AFF}Nick: {1E90FF}%s {1E90FF}registrado\n\n{FFFFFF} digite uma senha para continuar", Nome);
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
SendClientMessage(playerid,0x1E90FFAA,"Senha Incorreta !");
return 1;
}
new Nome[MAX_PLAYER_NAME];
new String[100];
new tmp;
GetPlayerName(playerid, Nome, sizeof(Nome));
format(file, sizeof(file), "Contas/%s.ini", Nome);
tmp = dini_Int(file, "Password");
if(udb_hash(inputtext) != tmp)
{
SendClientMessage(playerid,0x00FF00AA,"Senha incorreta digite-a novamente");
format(String, sizeof(String), "{058AFF}Nick: {1E90FF}%s {1E90FF}registrado\n\n{FFFFFF} digite uma senha para continuar", Nome);
ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
return 1;
}
else
{
SetarPlayer(playerid);
Logou[playerid]++;
if(Logou[playerid] == 1)
{
format(String, sizeof(String), "Comando Vermelho\nTerceiro Comando Puro\nAmigos dos Amigos\nPrimeiro Comando da Capital");
ShowPlayerDialog(playerid, ORG, DIALOG_STYLE_LIST, "Escolha sua Organizaзгo", String, "Escolher", "");
}
PlayerInfo[playerid][Admin] = dini_Int(file, "Level");
PlayerInfo[playerid][BOPE] = dini_Int(file, "BOPELevel");
PlayerInfo[playerid][CV] = dini_Int(file, "CVLevel");
PlayerInfo[playerid][TCP] = dini_Int(file, "TCPLevel");
PlayerInfo[playerid][ADA] = dini_Int(file, "ADALevel");
PlayerInfo[playerid][PCC] = dini_Int(file, "PCCLevel");
logado[playerid] = 1;
SendClientMessage(playerid,0x00FF00AA,"Vocк Foi Logado Com Sucesso!");
}
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Vocк nгo quis se logar, por este motivo serб Kickado");
Kick(playerid);
return 1;
}
}
if(dialogid == ORG)
{
if(response)
{
new sendername[24];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(file, sizeof(file), "Contas/%s.ini", sendername);
if(listitem == 1)
{
PlayerInfo[playerid][CV] = 1;
dini_IntSet(file, "CVLevel",1);
}
if(listitem == 2)
{
PlayerInfo[playerid][TCP] = 1;
dini_IntSet(file, "TCPLevel", 1);
}
if(listitem == 3)
{
PlayerInfo[playerid][ADA] = 1;
dini_IntSet(file, "ADALevel", 1);
}
if(listitem == 4)
{
PlayerInfo[playerid][PCC] = 1;
dini_IntSet(file, "PCCLevel", 1);
}
}
}
return 1;
}
//------------------------------------------------------------------------------