01.04.2009, 20:57
Firstly, here's my code
http://ampaste.net/m4b466c9d
(used boyletts auto-indenter, since pastebin fucks up indentation)
As you've maybe already seen, I'm making a rockthevote FS, just like the plugin(s) for AmxModX (CS)...
But this part doesn't get called
I've tried with only 1 player, but...
rockedVotes is 1 (since only 1 player has rocked the vote)
floatround(playerCount2 is 1 too, since 1 / 10 * 5 = 0.5 and if we use the method floatround_ceil (as I've tested in a simple script too) it turns into 1...
then rockedVotes and floatround(player.... is equal, but still the code doesn't get called (and the floatround thingy doesn't return like 1.000000, it returns 1)
Any help? I really need this
http://ampaste.net/m4b466c9d
(used boyletts auto-indenter, since pastebin fucks up indentation)
As you've maybe already seen, I'm making a rockthevote FS, just like the plugin(s) for AmxModX (CS)...
But this part doesn't get called
pawn Код:
if(rockedVotes == intfloat(floatround(playerCount2, floatround_ceil)))
{
SendClientMessageToAll(COLOR_GREEN, "Vote is now rocked!");
SendClientMessageToAll(COLOR_GREEN, "Voting will begin soon!");
SetTimer("startVote", 10*1000, false);
rockedVotes = 0;
voteIsRocked = 1;
return true;
}
rockedVotes is 1 (since only 1 player has rocked the vote)
floatround(playerCount2 is 1 too, since 1 / 10 * 5 = 0.5 and if we use the method floatround_ceil (as I've tested in a simple script too) it turns into 1...
then rockedVotes and floatround(player.... is equal, but still the code doesn't get called (and the floatround thingy doesn't return like 1.000000, it returns 1)
Any help? I really need this