[Tutorial] ZCMD - Commands collection [PART 1]
#2

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..
pawn Code:
stock PlayerName(playerid)
{
    new pName[25];
    GetPlayerName(playerid, pName, sizeof(pName));
    return pName;
}
You could save lines by doing
pawn Code:
PlayerName( playerid );
// OR
PlayerName( PID );
Last, at the /clearchat command, it's hilarious! Better with loop
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;
}
Reply


Messages In This Thread
ZCMD - Commands collection [PART 1] - by Twisted_Insane - 17.02.2012, 15:39
Re: ZCMD - Commands collection [PART 1] - by Konstantinos - 17.02.2012, 15:52
Re: ZCMD - Commands collection [PART 1] - by Mr.Fames - 17.02.2012, 15:57
Re: ZCMD - Commands collection [PART 1] - by Twisted_Insane - 17.02.2012, 18:29
Re: ZCMD - Commands collection [PART 1] - by [ABK]Antonio - 18.02.2012, 10:45
Re: ZCMD - Commands collection [PART 1] - by Twisted_Insane - 18.02.2012, 11:11
Re: ZCMD - Commands collection [PART 1] - by [Diablo] - 18.02.2012, 12:10
Re: ZCMD - Commands collection [PART 1] - by Twisted_Insane - 18.02.2012, 13:12
Re: ZCMD - Commands collection [PART 1] - by Twisted_Insane - 25.02.2012, 18:49
Re: ZCMD - Commands collection [PART 1] - by Karl[NDZ] - 20.03.2012, 14:00
Re: ZCMD - Commands collection [PART 1] - by Twisted_Insane - 20.03.2012, 14:07
Re: ZCMD - Commands collection [PART 1] - by Wickeed - 01.04.2012, 20:31
Re: ZCMD - Commands collection [PART 1] - by Twisted_Insane - 01.04.2012, 21:05
Re: ZCMD - Commands collection [PART 1] - by Ash. - 01.04.2012, 21:12
Re: ZCMD - Commands collection [PART 1] - by Twisted_Insane - 01.04.2012, 21:34
Re: ZCMD - Commands collection [PART 1] - by StrangeLove - 28.05.2012, 12:35
Re: ZCMD - Commands collection [PART 1] - by gnoomen2 - 07.08.2012, 00:13
Re: ZCMD - Commands collection [PART 1] - by gnoomen2 - 07.08.2012, 17:53
Re: ZCMD - Commands collection [PART 1] - by Diogo123 - 27.08.2012, 23:21
Re: ZCMD - Commands collection [PART 1] - by Chu - 25.09.2013, 06:49
Re: ZCMD - Commands collection [PART 1] - by Jhony_Blaze - 16.12.2014, 20:32
Re: ZCMD - Commands collection [PART 1] - by Arastair - 18.12.2014, 08:28
Re: ZCMD - Commands collection [PART 1] - by dopeboy1040 - 03.04.2017, 14:58
Re: ZCMD - Commands collection [PART 1] - by Variable™ - 04.04.2017, 12:00

Forum Jump:


Users browsing this thread: 1 Guest(s)