someone fix this
#1

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.
Reply
#2

For foreach this is like that :
pawn Код:
foreach (new i : Player)
For sscanf look his wiki : https://github.com/Y-Less/sscanf/wiki

For "CMD:", this is a command processing system.
https://sampforum.blast.hk/showthread.php?tid=91354
https://sampforum.blast.hk/showthread.php?tid=169029
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)