SA-MP Forums Archive
[Ajuda] Dinheiro regenerando ao Logar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Dinheiro regenerando ao Logar (/showthread.php?tid=418837)



Dinheiro regenerando ao Logar - IGp - 26.02.2013

Bom gente , to com essa dъvida , porque eu logo no meu server e fica dando exatamente 4.000 R$ para o player , mas sу aparece os numeros , mas nгo conta na sua grana de verdade . Nгo sei se vгo entender , mas por favor me ajudem ?!
Se quiserem uma public sу me falar !


Re: Dinheiro regenerando ao Logar - MatheusAlcapone - 26.02.2013

Poste o cуdigo.


Re: Dinheiro regenerando ao Logar - IGp - 26.02.2013

Codigo de que ? OnPlayerConnect

@EDIT

Quando ele tб com dinheiro negativo , regenera -4.000


Re: Dinheiro regenerando ao Logar - MatheusAlcapone - 26.02.2013

Posta a OnPlayerConnect e a OnPlayerSpawn


Re: Dinheiro regenerando ao Logar - IGp - 26.02.2013

pawn Код:
public OnPlayerSpawn(playerid)
{
emcasa[playerid] = 0;
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
TextDrawHideForPlayer(playerid, topblack);
TextDrawHideForPlayer(playerid, bottomblack);
TextDrawHideForPlayer(playerid, drogas1);
TextDrawHideForPlayer(playerid, drogas2);
TextDrawShowForPlayer(playerid, Relogio);
TextDrawShowForPlayer(playerid, gText2[playerid]);
SetPlayerInterior(playerid,0);
PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0); //
GangZoneShowForPlayer(playerid,favela,0xFF0000AA);
GangZoneShowForPlayer(playerid, areadmlv, 0xFF000096);
//bottttttttttttt=============================
//if(IsPlayerNPC(playerid))
//{
//new npcname[MAX_PLAYER_NAME];
//GetPlayerName(playerid, npcname, sizeof(npcname));
//if(!strcmp(npcname,"Samanta",true)) {
//SetPlayerColor(playerid,0x800080AA);
//SetPlayerSkin(playerid,11);
//GivePlayerWeapon(playerid,24,99999);
//}
//if(!strcmp(npcname,"Pimentel",true)) {
//SetPlayerColor(playerid,0x008000AA);
//SetPlayerSkin(playerid,113);
//GivePlayerWeapon(playerid,24,99999);
//}
///if(!strcmp(npcname,"Ronildo",true)) {
//SetPlayerColor(playerid,0x00FF00AA);
//SetPlayerSkin(playerid,70);
//}
//return 1;
//}
//variavel
gmod[playerid] = 0;
noevento[playerid] = 0;
GPS_Spawned[playerid] = 1;
nogame[playerid] = 0;
Logarprof(playerid);
autoescola[playerid] = 0;
prefls[playerid] = 0;
prefsf[playerid] = 0;
preflv[playerid] = 0;
nobarls[playerid] = 0;
nobarsf[playerid] = 0;
nobarlv[playerid] = 0;
nobarfc[playerid] = 0;
nautlls[playerid] = 0;
algemado[playerid] = 0;
sequestro[playerid] = 0;
vercmds[playerid]=0;
verpms[playerid]=0;
dini_IntSet(file, "convitent", 0);
dini_IntSet(file, "Entrevista", 0);
dini_IntSet(file, "MN", 0);
//fim
if(NaFaculdade[playerid] == 1){
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
PlayerPlaySound(playerid,1076,X,Y,Z);
SetPlayerHealth(playerid,999999);
SetPlayerPos(playerid,1494.4003,1304.2990,1093.2891);
SetPlayerInterior(playerid, 3);
TogglePlayerControllable(playerid, 1);
}
if(pAdmin[playerid] == 0){
admin[playerid] = 0;
dini_IntSet(file, "aAdmin", 0);
}
if(dini_Int(file, "Procurado") == 1){
Procurados[playerid]= 1;
}
if(dini_Int(file, "Procurado") == 0){
Procurados[playerid]= 0;
}
if(pAdmin[playerid] == 1 ){
admin[playerid] = 1;
}
if(pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
admin[playerid] = 1;
dini_IntSet(file, "aAdmin", 1);
}
if(dini_Int(file, "VIP") == 1){
vip[playerid] = 1;
SetPlayerMapIcon(playerid, 1, 1568.0254,-1896.3612,13.5605, 23, 0); //Bar Vip LS
//SetPlayerMapIcon(playerid, 2, -2155.2612,645.3902,52.3672, 23, 0); //Bar Vip SF
//SetPlayerMapIcon(playerid, 3, 2489.9238,2063.7310,10.8203, 23, 0); //Bar VIP LV
SendClientMessage(playerid, verdel, "(INFO) Vocк й um jogador VIP, aproveite!");
}
if(dini_Int(file, "VIP") == 0){
vip[playerid] = 0;
}
if(dini_Int(file, "Lutas") == 1){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
}
if(dini_Int(file, "Lutas") == 2){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
}
if(dini_Int(file, "Lutas") == 3){
SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
}
if(dini_Int(file, "Lutas") == 4){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
}
if(dini_Int(file, "Lutas") == 5){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
}
if(dini_Int(file, "Lutas") == 6){
SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
}
if(dini_Int(file,"novato") == 1){
new string22[256];
new ip2[128];
GetPlayerIp(playerid,ip2,128);
format(string22, sizeof(string22), "| Seu nick: %s » Seu ID: %d |", aname,playerid);
SendClientMessage(playerid, 0x0080FFAA, string22);
ShowPlayerDialog(playerid, Regras, DIALOG_STYLE_MSGBOX, "{FFFFFF}Tutorial", "~> {ADFF2F}Vocк nascerб em Los Santos\n~> Assine uma carteira na delegacia em Los Santos\n~> Va ate a prefeitura e pegue um emprego\n~> Estude na biblioteca\n~> Troque skins no simbolo da ''Camisa'' em Los Santos\n~> Nгo comete DM fora da favela pois sera preso\n~> Nгo cometa DM,Nгo xingue,Nгo peзa ADM,Nгo use xiters\n~> CONCORDA?.", "Concordo", "Discordo");
SendClientMessage(playerid, 0x99FFFFAA, "{ADFF2F}Vocк irб morar em LS e comeзarб uma nova vida");
SendClientMessage(playerid, 0x99FFFFAA, "{FFFFFF}Seja bem vindo ! Se precisar de ajuda, chame um ADM, Digite: /admins");
SendClientMessage(playerid, 0x99FFFFAA, "{ADFF2F}Nгo sabe jogar em nosso servidor? Digite: /tutorial");
SendClientMessage(playerid, 0x99FFFFAA, "{FFFFFF}Nгo tem nenhum ADM online? Estб precisando de ajuda? Digite: /ajuda");
}
if(dini_Int(file, "Preso") == 1){
SetPlayerPos(playerid, 263.8820,77.4002,1001.0391);
SetPlayerInterior(playerid, 6);
SetPlayerHealth(playerid,99999);
ResetPlayerWeapons(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, msgdm, "(INFO) Vocк estб preso. Para ser solto, contrate um advogado ou pague a fianзa /fianca");
preso[playerid] = 1;
dini_IntSet(file2, "ofmaconha", 0);
dini_IntSet(file2, "ofcocaina", 0);
dini_IntSet(file2, "ofcrack", 0);
dini_IntSet(file, "usoudroga", 0);
dini_IntSet(file, "tmaconha", 0);
dini_IntSet(file, "tcrack", 0);
dini_IntSet(file, "tcocaina", 0);
dini_IntSet(file, "Maconha", 0);
dini_IntSet(file, "Crack", 0);
dini_IntSet(file, "Cocaina", 0);
}
return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
blockpm[playerid] = 0;
morar[playerid] = 0;
moradia[playerid] = 0;
convitede[playerid] = 0;
PlayerInfo[playerid][LoginsFalsos] = 0;
pAdmin[playerid] = 0;
emcasa[playerid] = 0;
ResetPlayerGrana(playerid);
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Casa") == 1){
Create3DTextLabel(aname,Amarelo,dini_Int(file, "CasaX"),dini_Int(file, "CasaY"),dini_Int(file, "CasaZ"),80.0,0);
}
dini_IntSet(file, "DM", 0);
TextDrawShowForPlayer(playerid, bottomblack);
TextDrawShowForPlayer(playerid, topblack);
//settimers
SetTimerEx("semporte", 1000, 1,"e",playerid);
//variavels
CPSERVICE_actualcp[playerid] = 0;
AFK[playerid]=0;
multar[playerid]= 0;
autoescola[playerid] = 0;
nogame[playerid] = 0;
noevento[playerid] = 0;
PlayerInfo[playerid][Logged] = 0;
vip[playerid] = 0;
GPS_Spawned[playerid] = 0;
DMLiberado[playerid] = 0;
Mute[playerid] = 0;
//news
new Pname[MAX_PLAYER_NAME];
new string[256];
new sstring[256];
//============================================================================================================
dini_IntSet(file,"aAdmin",0);
if(dini_Int("nickban.ini",PlayerName(playerid)) == 1){
SendClientMessage(playerid, 0x11B1FFAA, "Vocк foi banido Motivo: Vocк estб banido!");
format(sstring, sizeof(sstring), "%s (%d) Foi banido |Motivo|: Nick Banido !", aname,playerid);
SendClientMessageToAll(0x11B1FFAA, sstring);
Kick(playerid);
return 1;
}
if(dini_Int("banidos.ini",PlayerName(playerid)) == 1){
SendClientMessage(playerid, 0x11B1FFAA, "Vocк foi banido |Motivo|: Conta estб banida!");
format(sstring, sizeof(sstring), "%s (%d) Foi banido |Motivo|: Conta estб banida", aname,playerid);
SendClientMessageToAll(0x11B1FFAA, sstring);
Kick(playerid);
return 1;
}
//============================================================================================================
GetPlayerName(playerid, Pname, sizeof(Pname));
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
SendClientMessage(playerid, 0xFFFFFFAA, " ");
format(string, sizeof(string), "{FFFFFF}~ %s Entrou No Servidor !", Pname);
SendClientMessageToAll(Violeta,string);
ApplyAnimation(playerid,"PARK","Tai_Chi_Loop",4.1,0,0,0,0,0);
SendClientMessage(playerid, 0xFFFFFFAA, "{FF0000}»»»»»»»»»» Seja Bem Vindo «««««««««");
GameTextForPlayer(playerid,"~w~Brasil~n~~g~Nova~n~~y~Vida~n~~l~RPG ", 8000, 3);

velo[playerid] = TextDrawCreate(210, 376,"~g~Velocidade:0Km/h");
TextDrawLetterSize(velo[playerid], 0, 0);
TextDrawTextSize(velo[playerid], 450, 500);
TextDrawAlignment(velo[playerid], 0);
TextDrawColor(velo[playerid], -1);
TextDrawUseBox(velo[playerid], 1);
TextDrawSetShadow(velo[playerid], 2);
TextDrawBoxColor(velo[playerid], 0);
TextDrawSetOutline(velo[playerid], 0);
TextDrawBackgroundColor(velo[playerid], 170);
TextDrawFont(velo[playerid], 1);
TextDrawSetProportional(velo[playerid], 1);
TextDrawHideForPlayer(playerid, velo[playerid]);
//icones
//icones
SetPlayerMapIcon(playerid, 1, 1942.0170,-1775.6377,13.6406, 55, 0); //Posto1
SetPlayerMapIcon(playerid, 2, 1006.5010,-936.5832,42.3281, 55, 0); //Posto2
SetPlayerMapIcon(playerid, 3, -90.9854,-1170.5535,2.3909, 55, 0); //Posto3
SetPlayerMapIcon(playerid, 4, -1675.9628,411.4728,6.7439, 55, 0); //Posto4
SetPlayerMapIcon(playerid, 5, -2410.6328,978.8200,45.4609,55, 0); //Posto5
SetPlayerMapIcon(playerid, 6, 2202.2441,2475.3787,10.8203,55, 0); //Posto6
SetPlayerMapIcon(playerid, 7, 2112.8740,920.8792,10.8203, 55, 0); //Posto7
SetPlayerMapIcon(playerid, 8, 1596.6265,2198.6599,10.7254, 55, 0); //Posto8
SetPlayerMapIcon(playerid, 11, 316.0611,-2007.8269,-0.6277, 9, 0); //area pescar
SetPlayerMapIcon(playerid, 12, 202.4053,-1875.5461,3.7082, 20, 0); //area vender pesca
SetPlayerMapIcon(playerid, 13, 369.8319,-1670.0024,32.7266, 19, 0); //autoescola fim
SetPlayerMapIcon(playerid, 14, -44.7421,-1232.7123,6.1583, 16, 0); //area de caca
SetPlayerMapIcon(playerid, 15, -39.1540,-1356.1106,2.4084, 62, 0); //venda de caca
SetPlayerMapIcon(playerid, 16, -60.2428,-1593.1473,2.6107, 50, 0); //venda de carga


//outros

SetPlayerMapIcon(playerid, 22, -319.2404,1049.3226,25.0135, 22, 0); //Hosp
SetPlayerMapIcon(playerid, 23, -176.3886,1035.3271,24.0391, 25, 0); //loja utilidades
SetPlayerMapIcon(playerid, 23, 613.0466,-494.9978,16.3359, 25, 0); //loja utilidades
SetPlayerMapIcon(playerid, 25, -311.2843,1303.6816,53.6643, 35, 0); //pref
SetPlayerMapIcon(playerid, 26, -145.0847,1224.3251,23.6328, 17, 0); //bar

//lavajatos
SetPlayerMapIcon(playerid, 28, 1911.3218,-1775.3804,13.3828, 56, 0); //Lava Jato1
SetPlayerMapIcon(playerid, 29, 2458.9067,-1460.9100,24.0000, 56, 0); //Lava Jato2
SetPlayerMapIcon(playerid, 30, 1017.6859,-917.2276,42.1797, 56, 0); //Lava jato3
SetPlayerMapIcon(playerid, 31, -111.0689,1130.1112,19.7422, 56, 0); //Lava jato4
//SetPlayerMapIcon(playerid, 32, 1403.4479,-1649.3298,13.3789, 27, 0); //ofocina
SetPlayerMapIcon(playerid, 34, 70.4469,1218.4811,18.8124, 55, 0); //Posto  FC
//news bairros
SetPlayerMapIcon(playerid, 41, 1555.4916,-1675.6893,16.1953, 30, 0); // icon dp ls
SetPlayerMapIcon(playerid, 42, 1481.1309,-1771.2568,18.7958, 23, 0); // icon pref ls
SetPlayerMapIcon(playerid, 43, 1160.4045,-1693.9617,14.0507, 45, 0); // icon shop ls
SetPlayerMapIcon(playerid, 44, 1172.2400,-1323.0621,15.4024, 22, 0); // icon hosp market
SetPlayerMapIcon(playerid, 45, 2033.7764,-1402.7045,17.2910, 22, 0); // icon josp ls jefferson
SetPlayerMapIcon(playerid, 53, 1363.4012,-1649.7007,13.3828, 27, 0); //Oficina
SetPlayerMapIcon(playerid, 54, 615.7462,1689.9661,6.9922, 55, 0); //Posto9
SetPlayerMapIcon(playerid, 56, 2638.4482,1100.8029,10.9609, 55, 0); //Posto10
SetPlayerMapIcon(playerid, 57, 1382.3641,459.0780,20.3452, 55, 0); //Posto11
SetPlayerMapIcon(playerid, 59, 655.5922,-565.3943,16.3359, 55, 0); //Posto11
SetPlayerMapIcon(playerid, 60, 1081.0103,-1697.9812,13.5469, 2, 0); //Faculdade LS
SetPlayerMapIcon(playerid, 62, 1831.9088,-1842.1598,13.5781, 25, 0); //Loja utl
SetPlayerMapIcon(playerid, 63, 1804.5730,-1711.6149,13.5415, 17, 0); //Bar ls
SetPlayerMapIcon(playerid, 68, 1285.5574,-1329.1753,13.5494, 52, 0); //caixa eletronico
SetPlayerMapIcon(playerid, 69, 1411.9891,-1701.3759,13.5395, 52, 0); //caixa eletronico
SetPlayerMapIcon(playerid, 70, 1242.8236,-1704.6500,13.5469, 52, 0); //caixa eletronico
SetPlayerMapIcon(playerid, 71, 1477.3513,-1710.3250,14.3525, 52, 0); //caixa eletronico
SetPlayerMapIcon(playerid, 72, 1722.3969,-1718.2037,13.5305, 52, 0); //caixa eletronico
SetPlayerMapIcon(playerid, 73, 1368.8425,-1312.6780,13.5469, 52, 0); //caixa eletronico
SetPlayerMapIcon(playerid, 74, 2140.6582,-1168.6848,23.9922, 52, 0); //caixa eletronico
SetPlayerMapIcon(playerid, 75, 537.4147,-1761.8303,14.3161, 52, 0); //caixa eletronico



//outros
SetSpawnInfo(playerid, 1, dini_Int(file, "Skin"), dini_Int(file, "CasaX"), dini_Int(file, "CasaY"), dini_Int(file, "CasaZ"),0, 0, 0, 0, 0, 0, 0);
return 1;
}



Re: Dinheiro regenerando ao Logar - Don_Speed - 26.02.2013

Procure no seu GameMode por GivePlayerMoney , e verifique se ele sta setando para esta grna que o vocк falou no topic .


Re: Dinheiro regenerando ao Logar - IGp - 26.02.2013

Procurei , e nao apareceu nada de 4.000 ! Aqui a's linhas :
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i)){
//GivePlayerMoney()(i);
GivePlayerMoney(i, GetPlayerGrana( i));

GetPlayerPos(i, PlayerCurrentPos[0], PlayerCurrentPos[1], PlayerCurrentPos[2]);