Bei mir waren eben paar typen auf den Server die zufällig den /g und /w command kannten und mein ganzen server crashten werend ich weg war...
Wo muss ich was hinschreiben damit der command nur für admins geht?
Das ist das /g...
#if WORL_SELECT == true
dcmd_g(playerid, params[]) {
new cString[128];
if (!strlen(params[0]))
{
SendClientMessage(playerid, COLOR_RED, "[USAGE]: /g GRAVITY or /gravity GRAVITY");
return true;
}
new Float:grav = floatstr(params[0]);
SetGravity(grav);
format(cString, 128, "[SUCCESS]: World gravity changed to %f", grav);
SendClientMessage(playerid, COLOR_GREEN, cString);
return true;
}
dcmd_gravity(playerid, params[])
return dcmd_g(playerid, params);
Und das das /w
dcmd_w(playerid, params[]) {
new idx, iString[128];
iString = strtok(params, idx);
if (!strlen(iString)) {
SendClientMessage(playerid, COLOR_RED, "[USAGE]: /w WEATHERID or /weather WEATHERID");
return true;
}
idx = strval(iString);
if (idx < MIN_WEAT_ID || idx > MAX_WEAT_ID) {
SendClientMessage(playerid, COLOR_RED, "[ERROR]: Invalid WEATHERID");
return true;
}
gWorldStatus[1] = idx;
SetWeather(idx);
format(iString, 128, "[SUCCESS]: Weather has changed to WEATHERID %d", idx);
SendClientMessage(playerid, COLOR_GREEN, iString);
return true;
}
dcmd_weather(playerid, params[])
return dcmd_w(playerid, params);
Schonmal danke im voraus!