26.07.2012, 12:44
Quote:
COMMAND:loadrace(playerid, params[]) { new file_name[128], str[256]; if(RaceAdmin == 1 && GetPVarInt(playerid, "admin_level") < 2) return SendClientMessage(playerid, red, "Error: You are not authorized to use this command."); Racemode = 0; Racelaps = 1; if(sscanf(params, "s[128]", file_name)) return SendClientMessage(playerid, yaris, "Usage: /loadrace [race name]"); if(LoadRace(file_name) == 0) return SendClientMessage(playerid, red ,"- Race - Race file couldn't find."); format(CRaceName, sizeof(CRaceName), "%s", file_name); format(str, sizeof(str), "- Race - Race %s is loaded.", CRaceName); SendClientMessage(playerid, yaris, str); LoadRace(file_name); } |