Help with this bug
#1

Код:
#include <a_samp>

new GiveScoreTimer1[MAX_PLAYERS];
new GiveScoreTimer2[MAX_PLAYERS];
new GiveScoreTimer3[MAX_PLAYERS];
new GiveScoreTimer4[MAX_PLAYERS];
new GiveScoreTimer5[MAX_PLAYERS];
new GiveScoreTimer6[MAX_PLAYERS];
new GiveScoreTimer7[MAX_PLAYERS];
new GiveScoreTimer8[MAX_PLAYERS];
new GiveScoreTimer9[MAX_PLAYERS];
new GiveScoreTimer10[MAX_PLAYERS];
new GiveScoreTimer11[MAX_PLAYERS];
new GiveScoreTimer12[MAX_PLAYERS];
new GiveScoreTimer13[MAX_PLAYERS];
new GiveScoreTimer14[MAX_PLAYERS];
new GiveScoreTimer15[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
   	GiveScoreTimer1[playerid] = SetTimerEx("Score_Timer1", 1000*60, 0, "d", playerid);
    GiveScoreTimer2[playerid] = SetTimerEx("Score_Timer2", 300000*60, 0, "d", playerid);
    GiveScoreTimer3[playerid] = SetTimerEx("Score_Timer3", 900000*60, 0, "d", playerid);
    GiveScoreTimer4[playerid] = SetTimerEx("Score_Timer4", 1440000*60, 0, "d", playerid);
    GiveScoreTimer5[playerid] = SetTimerEx("Score_Timer5", 1800000*60, 0, "d", playerid);
    GiveScoreTimer6[playerid] = SetTimerEx("Score_Timer6", 2400000*60, 0, "d", playerid);
    GiveScoreTimer7[playerid] = SetTimerEx("Score_Timer7", 4200000*60, 0, "d", playerid);
    GiveScoreTimer8[playerid] = SetTimerEx("Score_Timer8", 6000000*60, 0, "d", playerid);
    GiveScoreTimer9[playerid] = SetTimerEx("Score_Timer9", 12000000*60, 0, "d", playerid);
    GiveScoreTimer10[playerid] = SetTimerEx("Score_Timer10", 18000000*60, 0, "d", playerid);
    GiveScoreTimer11[playerid] = SetTimerEx("Score_Timer11", 24000000*60, 0, "d", playerid);
    GiveScoreTimer12[playerid] = SetTimerEx("Score_Timer12", 30000000*60, 0, "d", playerid);
    GiveScoreTimer13[playerid] = SetTimerEx("Score_Timer13", 36000000*60,0, "d", playerid);
    GiveScoreTimer14[playerid] = SetTimerEx("Score_Timer14", 42000000*60,0, "d", playerid);
    GiveScoreTimer15[playerid] = SetTimerEx("Score_Timer15", 48000000*60, 0, "d", playerid);
	return 1;
}

forward Score_Timer1(playerid);
public Score_Timer1(playerid)
{
    SetPlayerScore(playerid, 1);
    KillTimer(GiveScoreTimer1[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    KillTimer(GiveScoreTimer1[playerid]);
	return 1;
}
 // compile it // now shall i check it?

forward Score_Timer2(playerid);
public Score_Timer2(playerid)
{
    SetPlayerScore(playerid, 2);
    KillTimer(GiveScoreTimer2[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
forward Score_Timer3(playerid);
public Score_Timer3(playerid)
{
    SetPlayerScore(playerid, 3);
    KillTimer(GiveScoreTimer3[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
forward Score_Timer4(playerid);
public Score_Timer4(playerid)
{
    SetPlayerScore(playerid, 4);
    KillTimer(GiveScoreTimer4[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
forward Score_Timer5(playerid);
public Score_Timer5(playerid)
{
    SetPlayerScore(playerid, 5);
    KillTimer(GiveScoreTimer5[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
forward Score_Timer6(playerid);
public Score_Timer6(playerid)
{
    SetPlayerScore(playerid, 6);
    KillTimer(GiveScoreTimer6[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
forward Score_Timer7(playerid);
public Score_Timer7(playerid)
{
    SetPlayerScore(playerid, 7);
    KillTimer(GiveScoreTimer7[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
forward Score_Timer8(playerid);
public Score_Timer8(playerid)
{
    SetPlayerScore(playerid, 8);
    KillTimer(GiveScoreTimer8[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
forward Score_Timer9(playerid);
public Score_Timer9(playerid)
{
    SetPlayerScore(playerid, 9);
    KillTimer(GiveScoreTimer9[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
forward Score_Timer10(playerid);
public Score_Timer10(playerid)
{
    SetPlayerScore(playerid, 10);
    KillTimer(GiveScoreTimer10[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
forward Score_Timer11(playerid);
public Score_Timer11(playerid)
{
    SetPlayerScore(playerid, 11);
    KillTimer(GiveScoreTimer11[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
forward Score_Timer12(playerid);
public Score_Timer12(playerid)
{
    SetPlayerScore(playerid, 12);
    KillTimer(GiveScoreTimer12[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
forward Score_Timer13(playerid);
public Score_Timer13(playerid)
{
    SetPlayerScore(playerid, 13);
    KillTimer(GiveScoreTimer13[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
forward Score_Timer14(playerid);
public Score_Timer14(playerid)
{
    SetPlayerScore(playerid, 14);
    KillTimer(GiveScoreTimer14[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
forward Score_Timer15(playerid);
public Score_Timer15(playerid)
{
    SetPlayerScore(playerid, 15);
    KillTimer(GiveScoreTimer15[playerid]);
    GameTextForPlayer(playerid,"~r~ Congratulations, You got the higher level then your previous level",5000,5);
    return 1;
}
Ingame when i load this script, then, I spend 1 second(Just putted 1 second for checking), I don't get level 1, I get level 14 and after 2 or 3 mins then i get level 1? How to fix it
Reply
#2

What on earth? Use variables/arrays, not a million timers >.>
Reply
#3

Could you make it right now for me, I don't understand wat are you saying, if you are making? then kindly put the timers of levels same and also the gametext and levels should be 15 as i created
Reply
#4

Delete this post, I forgot that Doubleposts is not allowed, Sorry.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)