if (!strcmp(cmd, "/startdrift", true))
{
new tmp[256];
tmp = strtok(cmdtext, Index);
for (new i=0; i<MAX_DRIFTS; i++) if (IsDriftOn[i]) return SendClientMessage(playerid, COLOR_RED, "ERROR: There is already a drift on.");
if (!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /startdrift <driftid>");
if (!IsNumeric(tmp)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Drift ID must be a number.");
if (strval(tmp) > MAX_DRIFTS) return SendClientMessage(playerid, COLOR_RED, "ERROR: This drift does not exists.");
CurrentDrift = strval(tmp);
for (new i=0; i<MAX_PLAYERS; i++) {
if (IsPlayerConnected(i)) {
IsDriftOn[CurrentDrift] = true;
Winner[CurrentDrift] = 0;
DisablePlayerCheckpoint(i);
JoinedDrift[i][CurrentDrift] = 0;
CurrentCheckpoint[i] = 0;
InDrift[i][CurrentDrift] = 0;
}
}
SendClientMessageToAll(COLOR_GREEN, "A drift has started! Type /joindrift to join.");
return 1;
}