Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by [L3th4l]
That's not it, and it should be like that.
|
It is actually, Your coding isn't working, He's also told you where it is... Review it, and test it before saying it doesn't work
Код:
if(!IsPlayerConnected(i) || IsPlayerNPC(i) || !pConcerned[i]) continue;
{
if(pDKCount[i] >= 20) // High Kills
Notice they use normal brackets and square brackets... You have { } in your code.
Your code... is wrong.
and this guys...
Quote:
Originally Posted by bigcomfycouch
pawn Код:
public OnPlayerCommandReceived( playerid, cmdtext[ ] ) { if ( pInEvent{ playerid } ) { SendClientMessage( playerid, 0xFF000000, "You cannot use commands whilst in an event!" ); return 0; } return 1; }
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success ) { return success; }
|
is even wrong in the same area... Don't just copy paste and edit...
Posts: 1,496
Threads: 78
Joined: Jun 2008
Reputation:
0
Not to mention whether using which bracket is correct,
OnPlayerCommandReceived calls instantly when a player types a command(even if it's not exist)
OnPlayerCommandPerformed is called after searching for the commands,
and the success value is the value returned in that command(or is 0 when not found).
Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by [L3th4l]
Straight to the point, thanks!
|
Stop using the squiggly brackets, and use the proper ones like we said. You can find time to post a goddamn animated gif, but you can't read your own code
WTF?
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(success)
{
if([b]pInEvent{playerid} == 1[/b]) return 0;
}
return 1;
}
See, That bold piece, That's where your issue is, and it's because you use the { } brackets and not the ( ).
Posts: 244
Threads: 2
Joined: Jul 2010
Reputation:
0
Maybe he's not using it for an array? Ever think of that? -.-"