05.04.2016, 18:27
E ineficient sa folosesti 4837362 de comenzi de forma /setlevel, /setvip, /setcash, bla, bla, bla...
Server-ul meu are una si buna: /set
Nu este facuta de mine, ci de Eddu, din cate tin minte... Ori Eddu, ori Liviu, dar din cate stiu, merge ![Smiley](images/smilies/smile.png)
Server-ul meu are una si buna: /set
![Smiley](images/smilies/smile.png)
![Smiley](images/smilies/smile.png)
Код:
CMD:set(playerid, params[]) { new pID, rParam[10], Amount; Str[0] = '\0'; if(Player[playerid][Level] < 3) return ErrorMessages(playerid, 3); else { if(sscanf(params, "s[10]ui", rParam, pID, Amount)) return SendClientMessage(playerid, RED, "USAGE: {49FFFF}/set [Time/Weather/Level/VIP/Health/Coins] [ID] [Amount]"); //---------------------------------------------------------------------- else if(!IsPlayerConnected(pID)) return ERROR_NC(playerid); //---------------------------------------------------------------------- if(strcmp(rParam, "time", true) == 0) SetPlayerTime(pID, Amount, 0), format(Str, 200, "Administrator %s has setted you Time %d!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set Time"), PlayerPlaySound(pID,1057,0.0,0.0,0.0); if(strcmp(rParam, "weather", true) == 0) SetPlayerWeather(pID, Amount), format(Str, 200, "Administrator %s has setted you Weather %d!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set Weather"), PlayerPlaySound(pID,1057,0.0,0.0,0.0); if(strcmp(rParam, "coins", true) == 0 && IsPlayerAdmin(playerid)) Player[pID][Coins] = Amount, format(Str, 200, "Administrator %s has setted you %d Coins!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set Coins"), PlayerPlaySound(pID,1057,0.0,0.0,0.0); if(strcmp(rParam, "stunt", true) == 0 && IsPlayerAdmin(playerid)) Player[pID][Stunt] = Amount, format(Str, 200, "Administrator %s has setted you %d Stunt Points!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set StuntP"), PlayerPlaySound(pID,1057,0.0,0.0,0.0); if(strcmp(rParam, "drift", true) == 0 && IsPlayerAdmin(playerid)) Player[pID][Drift] = Amount, format(Str, 200, "Administrator %s has setted you %d Drift Points!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set DriftP"), PlayerPlaySound(pID,1057,0.0,0.0,0.0); if(strcmp(rParam, "race", true) == 0 && IsPlayerAdmin(playerid)) Player[pID][Race] = Amount, format(Str, 200, "Administrator %s has setted you %d Race Points!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set RaceP"), PlayerPlaySound(pID,1057,0.0,0.0,0.0); if(strcmp(rParam, "level", true) == 0 && IsPlayerAdmin(playerid)) Player[pID][Level] = Amount, format(Str, 200, "Administrator %s has setted you Admin Level %d!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set Level"), PlayerPlaySound(pID,1057,0.0,0.0,0.0); if(strcmp(rParam, "vip", true) == 0 && IsPlayerAdmin(playerid)) Player[pID][VIP] = Amount, format(Str, 200, "Administrator %s has setted you VIP Level %d!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set VIP"), Player[pID][TempVIP][1] = 0, PlayerPlaySound(pID,1057,0.0,0.0,0.0); if(strcmp(rParam, "gvip", true) == 0 && IsPlayerAdmin(playerid)) Player[pID][GoldVIP] = Amount, format(Str, 200, "Administrator %s has setted you Gold VIP %d!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set GVIP"), PlayerPlaySound(pID,1057,0.0,0.0,0.0); if(strcmp(rParam, "c4", true) == 0 && IsPlayerAdmin(playerid)) Player[pID][C4] = Amount, format(Str, 200, "Administrator %s has setted you %d C4s!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set C4"), PlayerPlaySound(pID,1057,0.0,0.0,0.0); if(strcmp(rParam, "respect+", true) == 0 && IsPlayerAdmin(playerid)) Player[pID][Respect][1] = Amount, format(Str, 200, "Administrator %s has setted you %d Respect(+)!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set Respect+"), PlayerPlaySound(pID,1057,0.0,0.0,0.0); if(strcmp(rParam, "respect-", true) == 0 && IsPlayerAdmin(playerid)) Player[pID][Respect][2] = Amount, format(Str, 200, "Administrator %s has setted you %d Respect(-)!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set Respect-"), PlayerPlaySound(pID,1057,0.0,0.0,0.0); if(strcmp(rParam, "hours", true) == 0 && IsPlayerAdmin(playerid)) Player[pID][Online][1] = Amount, format(Str, 200, "Administrator %s has setted you %d Online Time!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set Online"), PlayerPlaySound(pID,1057,0.0,0.0,0.0); if(strcmp(rParam, "money", true) == 0 && IsPlayerAdmin(playerid)) Player[pID][Money] = Amount, ResetPlayerMoney(pID), GivePlayerMoney(pID, Player[pID][Money]), format(Str, 200, "Administrator %s has setted you %d Money!", ReturnName(playerid), Amount), SendClientMessage(pID, YELLOW, Str), SendCommandToAdmins(playerid, "Set Money"), PlayerPlaySound(pID,1057,0.0,0.0,0.0); //---------------------------------------------------------------------- return 1; } }