17.02.2012, 15:52
The are parts that you don't explain much, only the defines and if player is connected/Invalid Player ID.
Also, I notice something that you never use.
What's the point of the PlayerName( playerid ), if you never use it and define new variables for the names then GetPlayerName etc..
You could save lines by doing
Last, at the /clearchat command, it's hilarious! Better with loop
Also, I notice something that you never use.
What's the point of the PlayerName( playerid ), if you never use it and define new variables for the names then GetPlayerName etc..
pawn Code:
stock PlayerName(playerid)
{
new pName[25];
GetPlayerName(playerid, pName, sizeof(pName));
return pName;
}
pawn Code:
PlayerName( playerid );
// OR
PlayerName( PID );
pawn Code:
COMMAND:clearchat( playerid, params[ ] )
{
if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: You must be level 1 to use this command!" );
{
for( new i = 0; i <= 100; i ++ ) SendClientMessageToAll( COLOR_WHITE, "" );
}
return 1;
}