- 0
Problema conditie.
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Reflex
Problema intalnita (descriere): Vreau sa pun la mai multe comenzi ca un anumit player , de exemplu "Test" sa nu poata lua ban, kick, jail. Cand incerc sa ii dau cuiva jail, imi spune "You cannot jail Test". La absolut toata lumea. Mai pe scurt, vreau sa fac ca player-ul Test sa nu poata lua jail de la nimeni.
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu):
CMD:jail(playerid, params[]) { if(PlayerInfo[playerid][Level] < 3) return SendError(playerid, "You need to be Admin Level 3 to use this command!"); //-------------------------------------------------------------------------- new liPlayer, jTime, Reason[40]; eString[0] = EOS; new tmp[64]; //-------------------------------------------------------------------------- if(sscanf(params, "uiS(No Reason)[40]", liPlayer, jTime, Reason)) return SendUsage(playerid, "/jail [PlayerID] [Time] [Reason]"); //-------------------------------------------------------------------------- if(!IsPlayerConnected(liPlayer)) return SendError(playerid, "Player is not connected."); //-------------------------------------------------------------------------- if(strcmp(tmp, "Test", true) == 0) return //aceste 2 linii le-am pus SendError(playerid, "You cannot jail Test"); //---- //-------------------------------------------------------------------------- if(liPlayer == playerid) return SendError(playerid, "You can't jail yourself!"); //-------------------------------------------------------------------------- if(PlayerInfo[liPlayer][Level] > PlayerInfo[playerid][Level]) return SendError(playerid, "You cannot use this command on this admin"); //-------------------------------------------------------------------------- if(PlayerInfo[liPlayer][Jailed] >= 1) return SendError(playerid, "Player is already in jail"); //-------------------------------------------------------------------------- if(jTime > 9999) return SendError(playerid, "Invalid Time!"); //-------------------------------------------------------------------------- PlayerInfo[playerid][PJails]++, PlayerInfo[liPlayer][Jailed] = 1; gTime[liPlayer][0] = jTime-1, gTime[liPlayer][1] = 60; //-------------------------------------------------------------------------- SetTimerEx("ShowJailLeftTime", 1000, 0, "i", liPlayer), SetTimerEx("JailPlayer", 5000, 0, "i", liPlayer), SetTimerEx("Jail1", 1000, 0, "i", liPlayer); //-------------------------------------------------------------------------- format(eString, sizeof(eString), "Administrator {FF0000}%s{D1D1D1} has Jailed {00A6FF}%s {D1D1D1}for %d Minutes. (Reason: %s)", PlayerName(playerid), PlayerName(liPlayer), jTime, Reason); SendClientMessageToAll(COLOR_GREY2, eString); //-------------------------------------------------------------------------- return 1; }Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da, am incercat mai multe posibilitati.
10 answers to this question
Recommended Posts