14.03.2011, 20:50
Wrong; AddPlayerClass is a function, not a statement.
strtok shouldn't be placed in a callback. Fixed script:
That should be okay
strtok shouldn't be placed in a callback. Fixed script:
pawn Код:
public OnGameModeInit()
{
new string[MAX_PLAYER_NAME];
SetGameModeText("WW-Stunts Beta");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}