Jump to content
  • 0

Se tot schimba weather aiurea


Question

Posted

Nick: Claudiul

Problema: Acum de la un timp se tot schimba weather aiurea si cateodata iti face totul mov , rosu , etc. . Vreau sa nu se mai schimbe asa aiurea .

Erori / warnings: -

Lini/script: -

Ai incercat sa rezolvi singur ?: Da , nu ma pricep.

7 answers to this question

Recommended Posts

Posted

???? Pai cand se schimbe weatherul, cand se conecteaza cineva, cand moare cineva, la un interval de timp....

Eu sunt nimeni. Dar prefer sa fiu un nimeni inconjurat de prieteni adevarati, decat un om faimos inconjurat de falsi.

Nu sunt un scripter perfect, nu sunt nici macar pe aproape, insa in in ciuda acestui fapt incerc sa invat sa le fac pe toate.

Posted

Ca deobicei ... cineva cu WOS :) din cate imi aduc eu bine aminte la OnGameModeInit este un timer care schimba weatheru' la toti playerii , cauta acel timer si stergel :)

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Posted

La fiecare ora fixa , deobicei seara se schimba weather si apare ba totul rosu , ba totul mov . Si trebuie sa schimb eu weather la tot serverul ca sa nu li se mai vada asa.

Posted

hmm ia dane functia pentru Paday

public Payday

Eu sunt nimeni. Dar prefer sa fiu un nimeni inconjurat de prieteni adevarati, decat un om faimos inconjurat de falsi.

Nu sunt un scripter perfect, nu sunt nici macar pe aproape, insa in in ciuda acestui fapt incerc sa invat sa le fac pe toate.

Posted

public PayDay()
{
	new string[128];
	new account,interest;
	new rent = 0;
	SetTimer("StartLotto", 30000, 0);
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(PlayerInfo[i][pLevel] > 0)
		    {
			    if(MoneyMessage[i]==1 && PlayerInfo[i][pJailed]==0)
				{
				    SendClientMessage(i, COLOR_LIGHTRED, "You failed to pay your debt, Jail time.");
				    GameTextForPlayer(i, "~r~Busted!", 2000, 1);
			        SetPlayerInterior(i, 10);
					SetPlayerPos(i, 223.2281,114.4777,999.0156);
		            PlayerInfo[i][pJailed] = 1;
		            ResetPlayerWeapons(i);
					WantedPoints[i] = 0;
					PlayerInfo[i][pJailTime] = 240;
					TextDrawShowForPlayer(i, Textdraw1[i]);
					format(string, sizeof(string), "You are jailed for %d seconds.   Bail: Unable", PlayerInfo[i][pJailTime]);
					SendClientMessage(i, COLOR_LIGHTBLUE, string);
				}
				new playername2[MAX_PLAYER_NAME];
				GetPlayerName(i, playername2, sizeof(playername2));
				account = PlayerInfo[i][pAccount];
				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 > GetPlayerMoney(i))
					{
						PlayerInfo[i][pPhousekey] = 255;
						SendClientMessage(i, COLOR_WHITE, "You have been evicted.");
						rent = 0;
					}
					HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
				}
				new tmpintrate;
				if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
				{
				    if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = intrate+4; }
					else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
				}
				else
				{
				    if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 3; }
					else { tmpintrate = 1; }
				}
				if(PlayerInfo[i][pPayDay] >= 5)
				{
				    Tax += TaxValue;//Should work for every player online
				    PlayerInfo[i][pAccount] -= TaxValue;
				    if(PlayerInfo[i][pDonateRank] > 0)
					{
					    new bonus = PlayerInfo[i][pPayCheck] / 2;
					    PlayerInfo[i][pPayCheck] += bonus;
					}
					new checks = PlayerInfo[i][pPayCheck];
				    new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
				    ConsumingMoney[i] = 1;
				    GivePlayerMoney(i, checks);
				    /*if(PlayerInfo[i][pAccount] > 0)
				    {
				    	PlayerInfo[i][pAccount] -= ebill;
				    	SBizzInfo[4][sbTill] += ebill;
					}
					else
					{
					    ebill = 0;
					}*/
					if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
					{
						if(account > 0)
						{
							account -= ebill;
							SBizzInfo[4][sbTill] += ebill;
						}
						else
						{
							ebill = 0;
						}
					}
					interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
					PlayerInfo[i][pCoin]++;
					PlayerInfo[i][pExp]++;
					PlayerPlayMusic(i);
					PlayerInfo[i][pAccount] = account+interest;
					SendClientMessage(i, COLOR_WHITE, "{4080FF}|___ {0080FF}BANK STATMENT {4080FF}___|");
					format(string, sizeof(string), "  {4080FF}Paycheck: {0080FF}$%d   {FFFFFF}Tax Money: {0080FF}-$%d", checks, TaxValue);
					SendClientMessage(i, COLOR_GRAD1, string);
					if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
					{
					    format(string, sizeof(string), "  {FFFFFF}Electricity Bill: {0080FF}-$%d", ebill);
						SendClientMessage(i, COLOR_GRAD1, string);
					}
					/*for(new a = 0; a < MAX_PLAYERS; a++)
	                {
                         if(AFKCheck[a] > 0)
                         {
                            tmpintrate = 0;
                            interest = (PlayerInfo[a][pAccount]/0)*(tmpintrate);
                         }///wipe
		            }*/
					format(string, sizeof(string), " {FFFFFF} Balance:{0080FF} $%d", account);
					SendClientMessage(i, COLOR_GRAD1, string);
					format(string, sizeof(string), "  {FFFFFF}Interest Rate:{0080FF} 0.%d percent",tmpintrate);
					SendClientMessage(i, COLOR_GRAD2, string);
					format(string, sizeof(string), "  {FFFFFF}Interest Gained{0080FF} $%d", interest);
					SendClientMessage(i, COLOR_GRAD3, string);
					SendClientMessage(i, COLOR_GRAD4, "|--------------------------------------|");
					format(string, sizeof(string), "  {FFFFFF}New Balance:{0080FF} $%d", PlayerInfo[i][pAccount]);
					SendClientMessage(i, COLOR_GRAD5, string);
					format(string, sizeof(string), "  {FFFFFF}Rent:{0080FF} -$%d", rent);
					SendClientMessage(i, COLOR_GRAD5, string);
					format(string, sizeof(string), " {FFFFFF} Coin: {0080FF}%d", PlayerInfo[i][pCoin]);
					SendClientMessage(i, COLOR_LIGHTBLUE, string);
					format(string, sizeof(string), "~y~PayDay~n~~w~Paycheck");
					GameTextForPlayer(i, string, 5000, 1);
					rent = 0;
					PlayerInfo[i][pPayDay] = 0;
					PlayerInfo[i][pPayCheck] = 0;
					PlayerInfo[i][pConnectTime] += 1;

					new leader = PlayerInfo[i][pLeader];
                    new member = PlayerInfo[i][pMember];
					if(gTeam[i] == 3 || member==5 || member==6 || member==15 || member==16 || member==17 || member==18)
					{
					   PlayerInfo[i][pRob] += 1;
					}
					else if(leader==5 || leader==6 || leader==15 || leader==16 || leader==17 || leader==18)
					{
                       PlayerInfo[i][pRob] += 1;
                    }
					if(PlayerInfo[i][pDonateRank] > 0)
					{
					    PlayerInfo[i][pPayDayHad] += 1;
					    if(PlayerInfo[i][pPayDayHad] >= 5)
					    {
					        PlayerInfo[i][pExp]++;
					        PlayerInfo[i][pCoin]++;
					        PlayerInfo[i][pPayDayHad] = 0;
					    }
					}
				}
				else
				{
				    SendClientMessage(i, COLOR_LIGHTRED, "* You haven't played long enough to obtain a PayDay.");
				}
			}
		}
	}
	if(allowedwet==true)
	{
 		VIEW_FROM_ABOVE = true;
 		isminigoingtostart=true;
		new strre[128];
		format( strre, sizeof( strre ), "Don't Get Wet"COL_RULE" minigame will start in 20 seconds. Type "COL_ORANGE"/getwet "COL_RULE"to join!");
		SendClientMessageToAll( ORANGE, strre );
		SetTimer( "MinigameCountdown", 20000, 0 );
		for( new i; i < MAX_SLOTS; i++ )
	    {
	        //The object (window) is only visible from one side
			Objects_[0][i] = CreateDynamicObject( 1649, gCoords[i][0], gCoords[i][1], gCoords[i][2], -90.000000, 0.000000, 0.000000, .interiorid = 0, .worldid = 0);
			if(!VIEW_FROM_ABOVE) //In case /getwet 2, we need to multiply number of objects and turn them around so players would be able to see them from below
			Objects_[1][i] = CreateDynamicObject( 1649, gCoords[i][0], gCoords[i][1], gCoords[i][2], -270.000000, 0.000000, 0.000000, .interiorid = 0, .worldid = 0);
			Iter_Add(_Objects, i );
	    }
	    inProgress = 1;
   	}
	SetTimer("RFCtimevla", 5000, 0);
	SetTimer("RFCtimett", 5000, 0);
	SetTimer("RFCtimeballas", 5000, 0);
	SetTimer("RFCtimeLSV", 5000, 0);
	SetTimer("RFCtimegrove", 5000, 0);
	SetTimer("RFCtimetm", 5000, 0);
	AllCommandLog(string);
	ChatLog(string);
	AdminChatLog(string);
	ReportLog(string);
	NameChangeLog(string);
	AdminLog(string);
	DepartmentChatLog(string);
	RadioChatLog(string);
	AdminChatLog(string);
	//Checkprop();
	SetTimer("RACtime", 10000, 0);
	SendClientMessageToAll(COLOR_RED,"{FFFFFF}[{8040FF}TD{FFFFFF}]: Toate masinile vor fi auto-respawnate in {009999}10 {FFFFFF}secunde de{8040FF} SERVER");
	return 1;
}

forward StartLotto();
public StartLotto()
{
	new string[128];
	format(string, sizeof(string), "TD{FFFFFF} Lotto:{EAEAEA}Este timpul pentru lotto! Alege numarul{00B366} /lotto 1-50 {EAEAEA} Premiu:{008E00} $%d", Jackpot);
    SendClientMessageToAll(COLOR_GREEN, string);
	format(string, sizeof(string), "~y~Lotto!!  ~n~~w~Alegeti numarul  ~n~~p~/lotto 1-50  ~g~($1500)  ~n~~r~Premiu: ~g~$%d", Jackpot);
	GameTextForAll(string, 4000, 3);
	SetTimer("StartLottoElection", 30000, 0);

}

forward StartLottoElection();
public StartLottoElection()
{
	new string[128];
	format(string, sizeof(string), "Lotto: Au inceput extragerile.");
	SendClientMessageToAll(COLOR_GREEN, string);
	GameTextForAll("~y~Lotto Ruleaza.....",12000,0);
	SetTimer("StartLotto2", 12000,false);
}

forward StartLotto2();
public StartLotto2()
{
    if(lottonumber > 0)
	{
		Lotto(lottonumber);
		lottonumber = 0;
	}
	else
	{
		new rand = random(40);
		if(rand < 37) { rand += 3; }
		Lotto(rand);
	}
}

strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}

	new offset = index;
	new result[20];
	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}

public split(const strsrc[], strdest[][], delimiter)
{
	new i, li;
	new aNum;
	new len;
	while(i <= strlen(strsrc)){
	    if(strsrc[i]==delimiter || i==strlen(strsrc)){
	        len = strmid(strdest[aNum], strsrc, li, i, 128);
	        strdest[aNum][len] = 0;
	        li = i+1;
	        aNum++;
		}
		i++;
	}
	return 1;
}

Credca asta.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.