Command not working properly second and next times
#1

Hi. Iґve got a /vote command:
Код:
dcmd_vote(playerid, params[])
{
	if(IsPlayerConnected(playerid))
	{
		if(ServerCFG[VoteInProgress]) return SCM(playerid, B_BILA, "[ 0 ] Voting is already in progress.");
		else if(!strlen(params)) return SCM(playerid, B_BILA, "[ 0 ] USAGE: /vote QUESTION");
		else if(strlen(params) > 128) return SCM(playerid, B_BILA, "[ 0 ] Max. lenght of question is 128 chars.");
	  new string[256];
		format(string,sizeof(string),"[ VOTE ] Player %s started a vote, question: %s , vote is during 1 minute, use /yes /no.", Nick(playerid), params);
		SCMToAll(B_ZLUT,string);
		Timer[T_VoteEnd] = SetTimer("VoteEnd",60000,0);
    ServerCFG[VoteInProgress] = true;
	}
	return 1;
}
And if player uses it first time after connecting to the server, it works, but second and more times it doesnґt show the question, just starts the timer etc. Whereґs the problem? Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)