[Ajuda] Erro Payday
#1

Olб,bom vim aqui pedir ajuda,estou com um problema toda vez que dou /gmx,pode ser 10:10 quando ele da GMX e volta da o Payday do nada...

Se precisarem de algum code peзam pois nгo encontrei o erro.

Grato desde jб !
Reply
#2

Comando /gmx e a callback do PayDay
Reply
#3

Код:
	if(strcmp(cmd, "/gmx", true) == 0 || strcmp(cmd, "/restart", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        //new string22[128];
		    if (PlayerInfo[playerid][pAdmin] >=1342)
			{
			    if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != DONO) { return SendClientMessage(playerid, COLOR_AMARELOR, "Vocк nгo estб trabalhando! (/pa)"); }
				for(new i = 0; i < MAX_PLAYERS; i++)
				{
		    		if(IsPlayerConnected(i))
		    		{ OnPlayerSave(i); }
				}
				GameTextForPlayer(playerid, "Servidor Reiniciando aguarde,nao saia do servidor ! ", 3000, 3);
				GameModeExitFunc();
				SaveAccounts();
				OnPlayerSave(playerid);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para dar GMX!");
			}
		}
		return true;
	}
Код:
public PayDay()
{
	new Conta,interest;
	SaveAccounts();
	new rent = 0;
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) && !IsPlayerNPC(i))
		{
		    if(PlayerInfo[i][pLevel] > 0)
		    {
			    if(MoneyMessage[i]==1)
				{
				    SendClientMessage(i, COLOR_LIGHTRED, "Vocк nгo pagou a sua dнvida e foi preso.");
				    GameTextForPlayer(i, "~r~Preso!", 2000, 1);
				    SetPlayerInterior(i, 6);
			   		SetPlayerPos(i, 264.6288,77.5742,1001.0391);
		            PlayerInfo[i][pJailed] = 1;
		            ResetPlayerWeaponsEx(i);
                    WantedPoints[i] = 0;
      				SetPlayerWantedLevel(i, 0);
					PlayerInfo[i][pJailTime] = 600;
					format(gstring, sizeof(gstring), "Vocк foi preso por %d segundos.", PlayerInfo[i][pJailTime]);
					SendClientMessage(i, COLOR_LIGHTBLUE, gstring);
				}
				new playername2[MAX_PLAYER_NAME];
				GetPlayerName(i, playername2, sizeof(playername2));
				Conta = PlayerInfo[i][pConta];
				new key = PlayerInfo[i][pPHousekey];
				if(key != 255)
				{
					rent = HouseInfo[key][hRent];
					if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
					{
						rent = 0;
					}
					else if(rent > GetPlayerMoneyEx(i))
					{
						PlayerInfo[i][pPHousekey] = 255;
						SendClientMessage(i, COLOR_WHITE, "Vocк foi expulso(a).");
						rent = 0;
					}
					HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
				}
				new tmpintrate;
			    if(PlayerInfo[i][pVIP] == 1) { tmpintrate = 3; }
			    else if(PlayerInfo[i][pVIP] == 2) { tmpintrate = 4; }
				else { tmpintrate = 1; }
				if(PlayerInfo[i][pPayDay] >= 3)
				{
				    Tax += TaxValue;//Shorld work for every player online
				    PlayerInfo[i][pConta] -= TaxValue;
					new checks = PlayerInfo[i][pSalario];
				    new ebill = (PlayerInfo[i][pConta]/30000)*(PlayerInfo[i][pLevel]);
				    ConsumingMoney[i] = 1;
				    GivePlayerMoneyEx(i, checks);
				    if(PlayerInfo[i][pConta] > 0)
				    {
				    	PlayerInfo[i][pConta] -= ebill;
				    	SBizzInfo[4][sbTill] += ebill;
					}
					else
					{
					    ebill = 0;
					}
					interest = (PlayerInfo[i][pConta]/1000)*(tmpintrate);
					PlayerInfo[i][pExp]++;
					PlayerPlayMusic(i);
					PlayerInfo[i][pConta] = Conta+interest;
					SendClientMessage(i, 0x33FF00FF, "-------------------Pagamento-------------");
					format(gstring, sizeof(gstring), "  Salбrio: R$%d   Imposto: -R$%d", checks, TaxValue);
					SendClientMessage(i, VERMELHO, gstring);
					SendClientMessage(i, COLOR_AMARELOR, "  Mйdico: R$300");
					if(PlayerInfo[i][pPHousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
					{
					    format(gstring, sizeof(gstring), "  Energia: -R$%d", ebill);
						SendClientMessage(i, VERMELHO, gstring);
					}
					format(gstring, sizeof(gstring), "  Banco: R$%d", Conta);
					SendClientMessage(i, COLOR_AMARELOR, gstring);
					format(gstring, sizeof(gstring), "  Juros: 0.%d  por cento",tmpintrate);
					SendClientMessage(i, VERMELHO, gstring);
					SendClientMessage(i, COLOR_AMARELOR, "|_______________________________________|");
					format(gstring, sizeof(gstring), "  Novo extrato: R$%d", PlayerInfo[i][pConta]);
					SendClientMessage(i, VERMELHO, gstring);
					format(gstring, sizeof(gstring), "  Aluguel: -R$%d", rent);
					SendClientMessage(i, COLOR_AMARELOR, gstring);
					PlayerPlaySound(i, 1185, 0.0, 0.0, 0.0);
					format(gstring, sizeof(gstring), "~r BSL ~g PAGAMENTO");
					GameTextForPlayer(i, gstring, 5000, 1);
					GivePlayerMoneyEx(i,- 300);
					rent = 0;
					PlayerInfo[i][pPayDay] = 0;
					PlayerInfo[i][pSalario] = 0;
					PlayerInfo[i][pConnectTime] += 1;
                    PlayerInfo[i][pCaixinha] = 0;
					pban[i] = 0;
					if(PlayerInfo[i][pEmprego] > 0)
	    			{
	    	    		if(PlayerInfo[i][pContractTime] < 25)
	    	    		{
							PlayerInfo[i][pContractTime] ++;
						}
	    			}
				}
				else
				{
				    SendClientMessage(i, COLOR_LIGHTRED, "* Vocк nгo jogou tempo suficiente para Receber salбrio!.");
				}
			}
		}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)