01.02.2015, 09:13
can someone fix this in my script
1. Replace loops like this:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
With:
foreach(Player, i)
2. Replace strtok with sscanf.
3. Replace the "if(strcmp(cmd, "something"" under OnPlayerText, move them out of OnPlayerText and rename it all to "CMDomething(playerid, params[])".
You probably also have to change the commands a little in order for them to work with zcmd.
1. Replace loops like this:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
With:
foreach(Player, i)
2. Replace strtok with sscanf.
3. Replace the "if(strcmp(cmd, "something"" under OnPlayerText, move them out of OnPlayerText and rename it all to "CMDomething(playerid, params[])".
You probably also have to change the commands a little in order for them to work with zcmd.