Why does ..
#1

Hello every one
I want Make when map start /Class command Enable for just frist 30 sec its work but It Spam sendClientMessage
Like this
Код:
/Class Timer is over
/Class Timer is over
/Class Timer is over
/Class Timer is over
/Class Timer is over
/Class Timer is over
i will show script
Код:
new CMDClass[MAX_PLAYERS];
new Timer;
Код:
public NextMap()
{
for(new i;i<MAX_PLAYERS;i++)
	{
		switch(Map[ID])
		{
			case 0://map 1
	    	{
	    		SetPlayerWeather(i,0);
				SetPlayerTime(i,13,0);
    			SetPlayerInterior(i,0);
   			 	Timer = SetTimer("dissablecmd",30000,false);
	    		TogglePlayerControllable(i, false);
				ResetPlayerWeapons(i);
				CMDClass[i] = 0;
				SetPlayerScore(i, GetPlayerScore(i)+40);
				gTeam[i] = TEAM_HUMANS;			}
}
}
}

                                             //and others cases
Код:
forward dissablecmd(playerid);
public dissablecmd(playerid)
{
KillTimer(Timer);
CMDClass[playerid] = 1;
SendClientMessageToAll(COLOR_LIGHTBLUE,"/class time is over");
print("/class time is over");
return 1;
}
Reply
#2

i think its from for
Код:
for(new i;i<MAX_PLAYERS;i++)
do i have to make Swich ?
if yes then How :O ?
Reply
#3

dont bump its against the rules!!

pawn Код:
forward dissablecmd(playerid);
public dissablecmd(playerid)
{
KillTimer(Timer);
CMDClass[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,"/class time is over");
print("/class time is over");
return 1;
}
try that

edit also you should be using SetTimerEx

pawn Код:
Timer = SetTimerEx("dissablecmd",30000,false,"i",i);
Reply
#4

Quote:
Originally Posted by Jonny5
Посмотреть сообщение
dont bump its against the rules!!

pawn Код:
forward dissablecmd(playerid);
public dissablecmd(playerid)
{
KillTimer(Timer);
CMDClass[playerid] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,"/class time is over");
print("/class time is over");
return 1;
}
try that

edit also you should be using SetTimerEx

pawn Код:
Timer = SetTimerEx("dissablecmd",30000,false,"i",i);
No work :\
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)