Jump to content
  • 0

pomoc Fs od skibiga nejde /hodnost


Z.D.E.N.E.K

Dotaz

Prosím mam takový menší problem s fs od skibiga je to SAllFunction nejde /hodnost napíšu normalně /hodnost 0 Majitel a napiše chybny přikaz /hodnost id (hodnost)

 

Kod :

/*
|***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***|
 _______    _______  _        _        _______           _        _______ __________________ _______  _
(  ____ \  (  ___  )( \      ( \      (  ____ \|\     /|( (    /|(  ____ \\__   __/\__   __/(  ___  )( (    /|
| (    \/  | (   ) || (      | (      | (    \/| )   ( ||  \  ( || (    \/   ) (      ) (   | (   ) ||  \  ( |
| (_____   | (___) || |      | |      | (__    | |   | ||   \ | || |         | |      | |   | |   | ||   \ | |
(_____  )==|  ___  || |      | |      |  __)   | |   | || (\ \) || |         | |      | |   | |   | || (\ \) |
      ) |==| (   ) || |      | |      | (      | |   | || | \   || |         | |      | |   | |   | || | \   |
/\____) |==| )   ( || (____/\| (____/\| )      | (___) || )  \  || (____/\   | |   ___) (___| (___) || )  \  |
\_______)  |/     \|(_______/(_______/|/       (_______)|/    )_)(_______/   )_(   \_______/(_______)|/    )_)
 
|***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***|
                                            |***| By © SkiBig18     |***|
                                            |***| Verze: 8.00         |***|
                                            |***| Datum: x.x.2014     |***|
                                    |***| " Kopíráci nebudou tolerováni ! " |***|
|***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***| |***|
*/
//==============================================================================
#include a_samp
#include sscanf2
#define C -1
#pragma tabsize 0
#define p playerid
#define SVH SetVehicleHealth
#define DEFAULT_HODNOST "Hráč"
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define SCM SendClientMessage
#define SCMTA SendClientMessageToAll
#define GPW GivePlayerWeapon
#define GPM GivePlayerMoney
#define SPH SetPlayerHealth
#define SPA SetPlayerArmour
#define SPS SetPlayerSkin
#define SPN SetPlayerName
#define IPA IsPlayerAdmin
#define IPC IsPlayerConnected
#define SPWL SetPlayerWantedLevel
#define SPC SetPlayerColor
#define RPW ResetPlayerWeapons
#define RPM ResetPlayerMoney
#define SetVehicleInterior LinkVehicleToInterior
#define IPIAV IsPlayerInAnyVehicle
#define GetPM GetPlayerMoney
#define STE SetTimerEx
#define SPD ShowPlayerDialog
#define r         "{FF0000}"
#define o         "{FFA500}"
#define g         "{00FF00}"
#define w       "{FFFFFF}"
#define c       "{00FFFF}"
//=======================
stock PlayerName(playerid){ new name[MAX_PLAYER_NAME];GetPlayerName(playerid,name,MAX_PLAYER_NAME); return name;}
stock ski_str[144];
#define StringF(%0,%1,%2) format(ski_str, sizeof(ski_str), %1, %2), SendClientMessageToAll(%0,ski_str)
//==============================================================================
new Hodnosti,
Freeze,
Vozidlo[MAX_PLAYERS],
Spawnuto[MAX_PLAYERS],
Prejmenovano[MAX_PLAYERS],
Jmeno[MAX_PLAYERS][50],
SAF,
Hodnost[MAX_PLAYERS][30];
//==============================================================================
//==============================================================================
public OnPlayerText(p,text[]){
if(Hodnosti == 1)
{
new gs[144];
if(IPA(p)){
format(gs,sizeof(gs),""r"[ ~Admin~ ] %s"w" (ID:%d): %s",PlayerName(p),p,text);
SCMTA(-1,gs);
}else{
format(gs,sizeof(gs),""g"[ ~Hráč~ ] "w"%s (ID:%d): %s",PlayerName(p),p,text);
SCMTA(-1,gs);
}
return 0;
}
new s2[144];
format(s2,sizeof(s2),""c"[ ~%s~ ] "w"%s (ID:%d): %s",Hodnost[p],PlayerName(p),p,text);
SCMTA(-1,s2);
return 0;
}
//==============================================================================
//==============================================================================
public OnPlayerDisconnect(p,reason){
Spawnuto[p] = 0;
Prejmenovano[p] = 0;
return 1;
}
//==============================================================================
//==============================================================================
public OnPlayerConnect(p){SCM(p,-1,""r"[ SAF ] "w"Tento script naprogramoval "r"~"g"S"r"kiB"g"ig18"r"~"); Hodnost[p] = DEFAULT_HODNOST;return 1;}
//==============================================================================
//==============================================================================
public OnPlayerCommandText(p,cmdtext[]){
//==============================================================================
if( strcmp("/povsaf",cmdtext,true) == 0){
if( !IPA(p)) return SCM(p,-1, ""r"[ SAF ] "w"Nejsi RCON Administrátor na otevření !");
else if(SAF == 0) return SCM(p,-1,""r"[ SAF ] "w"SAllFunction menu už je povoleno !");
SAF = 0;
SCM(p, -1,""r"[ SAF ] "w"SAllFunction menu bylo úspěšně povoleno !");
return 1;
}
//==============================================================================
if( strcmp("/zaksaf",cmdtext,true) == 0){
if( !IPA(p)) return SCM(p,-1, ""r"[ SAF ] "w"Nejsi RCON Administrátor na otevření !");
else if(SAF == 1) return SCM(p,-1,""r"[ SAF ] "w"SAllFunction menu už je zakázáno !");
SAF = 1;
SCM(p, -1,""r"[ SAF ] "w"SAllFunction menu bylo úspěšně zakázáno !");
return 1;
}
//==============================================================================
if( strcmp("/saf",cmdtext,true) == 0){
if( !IPA(p)) return SCM(p,-1, ""r"[ SAF ] "w"Nejsi RCON Administrátor na otevření !");
else if(SAF == 1) return SCM(p, -1,""r"[ SAF ] "w"SAllFunction menu bylo zakázáno !");
new s[700];
strcat(s,""w"Nastavení serveru\n");
strcat(s,""w"Nastavení hráčů\n");
strcat(s,""w"Jiné funkce\n");
strcat(s,""w"Dary všem hráčům\n");
strcat(s,""w"Další server funkce\n");
strcat(s,""w"Příkazy\n");
strcat(s,""w"Portace\n");
strcat(s,""w"Credit\n");
SPD(p,18172,DIALOG_STYLE_LIST,""o"SAllFunction",s,"Vybrat","Zavrit");
return 1;
}
//==============================================================================
dcmd(hodnost,7,cmdtext);
dcmd(removehodnost,13,cmdtext);
return 0;}
//==============================================================================
//==============================================================================
dcmd_hodnost(p,params[]){ new id,hodnost[30];
if( !IPA(p) ) return SCM(p, -1, ""r"[ SAF-Hodnost ] "w"Nejsi RCON Administrátor !");
else if( sscanf(params,"is",id,hodnost) ) return SCM(p,-1,""r"[ SAF-Hodnost ] "w"Špatně zadaný příkaz: "r"/hodnost [iD] [HODNOST] "w"!");
else if( !IPC(id) ) return SCM(p,-1,""r"[ SAF-Hodnost ] "w" Hráč není připojený !");
new s[128];
format(s,sizeof(s),""r"[ SAF-Hod ] "w"Úspešně si napsal hráči %s hodnost "c"%s",PlayerName(id),hodnost);
SCM(p,-1,s);
Hodnost[id] = hodnost;
return 1;
}
//==============================================================================
dcmd_removehodnost(p,params[]){ new id;
if( sscanf(params,"i",id) ) return SCM(p,-1,""r"[ SAF-Hodnost ] "w"Špatně zadaný příkaz: "r"/removehodnost [iD] "w"!");
else if( !IPC(id) ) return SCM(p,-1,""r"[ SAF-Hodnost ] "w" Hráč není připojený !");
new s[128];
format(s,sizeof(s),""r"[ SAF-Hod ] "w"Úspešně si hráči %s odebral hodnost",PlayerName(id));
SCM(p,-1,s);
Hodnost[id] = ""g"[ ~Hráč~ ]";
return 1;
}
//==============================================================================
//==============================================================================
public OnDialogResponse(p,dialogid,response,listitem,inputtext[]){
//==============================================================================
if(dialogid == 18172 && response){
switch(listitem){
//====================
case 0:{
new s[800];
strcat(s,""w"Nastavit HostName\n");
strcat(s,""w"Nastavit GameModeText\n");
strcat(s,""w"Nastavit MapName\n");
strcat(s,""w"Nastavit Server WebURL\n");
strcat(s,""w"Zamknout server na heslo "r"12345\n");
strcat(s,""w"Odemnkout server\n");
strcat(s,""w"Nastavit zabíjejcí gravitaci\n");
strcat(s,""w"Nastavit letajicí gravitaci\n");
strcat(s,""w"Nastavit normální gravitaci\n");
strcat(s,""w"Resetovat server\n");
strcat(s,""w"Vypnout server\n");
SPD(p,15110,DIALOG_STYLE_LIST,""o"Nastavení serveru",s,"Vybrat","Zavrit");
}
//====================
case 1:{
new s[1000];
strcat(s,""w"Zabit všechny hráče\n");
strcat(s,""w"Uzdravit všechny hráče\n");
strcat(s,""w"Smazat hráčům vestu\n");
strcat(s,""w"Doplňit hráčům vestu\n");
strcat(s,""w"Zníčit všem hráčům vozidla\n");
strcat(s,""w"Opravit všem hráčům vozidla\n");
strcat(s,""w"Vyhodit hráče z vozidel\n");
strcat(s,""w"Zmrazit všechny hráče\n");
strcat(s,""w"Odmrazit všechny hráče\n");
strcat(s,""w"Nastavit všem hodnosti\n");
strcat(s,""w"Odebrat všem hodnosti\n");
strcat(s,""w"Resetovat všem zbraně\n");
strcat(s,""w"Resetovat všem peníze\n");
strcat(s,""w"Nastavit hráčům jiný svět\n");
strcat(s,""w"Nastavit hráčům normální svět\n");
SPD(p,13001,DIALOG_STYLE_LIST,""o"Nastavení hráčů",s,"Vybrat","Zavrit");
}
//====================
case 2:{
new s[400];
strcat(s,""w"Napsat zprávu pro všechny\n");
strcat(s,""w"Spawnout vozidlo\n");
strcat(s,""w"Smazat spawnuté vozidlo\n");
strcat(s,""w"Přejmenovat na "r"NoName\n");
strcat(s,""w"Přejmenovat zpět\n");
SPD(p,11002,DIALOG_STYLE_LIST,""o"Jiné funkce",s,"Vybrat","Zavrit");
}
//====================
case 3:{
new s[500];
strcat(s,""w"Dát hráčům Granát\n");
strcat(s,""w"Dát hráčům Motorovou pilu\n");
strcat(s,""w"Dát hráčům Minigum\n");
strcat(s,""w"Dát hráčům Raketomet\n");
strcat(s,""w"Dát hráčum Teplo-naváděcí raketomet\n");
strcat(s,""w"Dát hráčům Padák\n");
SPD(p,10013,DIALOG_STYLE_LIST,""o"Dary hráčům",s,"Vybrat","Zavrit");
}
//====================
case 4:{
new s[800];
strcat(s,""w"Informace o hráčích (Nick+ID)\n");
strcat(s,""w"Informace o hráčích (Skin+Vozidlo)\n");
strcat(s,""w"Vyhodit všechny hráče\n");
strcat(s,""w"Změnit server počasí\n");
strcat(s,""w"Změnit server čas\n");
SPD(p,10014,DIALOG_STYLE_LIST,""o"Informace",s,"Vybrat","Zavrit");
}
//====================
case 5:{
new s[600];
strcat(s,""c"/hodnost "w"= Nastaví jinou hodnost\n");
strcat(s,""c"/removehodnost "w"= Odstrání hodnost\n");
strcat(s,""c"/zaksaf "w"= Zakáže /saf\n");
strcat(s,""c"/povsaf "w"= Povolí /saf\n");
SPD(p,8772,DIALOG_STYLE_LIST,""o"Příkazy",s,"Vybrat","Zavrit");
}
//====================
case 6:{
new s[600];
strcat(s,""w"Portnout všechny do "c"Los Santos\n");
strcat(s,""w"Portnout všechny do "c"San Fierro\n");
strcat(s,""w"Portnout všechny do "c"Las Venturas\n");
strcat(s,""w"Portnout RCON Adminy do "c"Los Santos\n");
strcat(s,""w"Portnout RCON Adminy do "c"San Fierro\n");
strcat(s,""w"Portnout RCON Adminy do "c"Las Venturas\n");
SPD(p,21121,DIALOG_STYLE_LIST,""o"Porty",s,"Vybrat","Zavrit");
}
//====================
case 7:{
new s[800];
strcat(s,""r"|===============| "o"SAllFunction "r"|===============\n");
strcat(s,""c"Script: "w"SAllFunction\n");
strcat(s,""c"Autor: "r"~"g"Ski"r"Big"g"18"r"~\n");
strcat(s,""c"Verze: "w"8.0\n");
strcat(s,""c"Účel: "w"Pomocník se serverem.\n");
strcat(s,""c"Důvod: "w"Nuda.\n");
strcat(s,""r"|===============| "o"SAllFunction "r"|===============\n");
SPD(p,1005,DIALOG_STYLE_MSGBOX,""o"Credits",s,"Zavrit","");
}}
return 0;
}
//==============================================================================
if(dialogid == 15110 && response){
switch(listitem){
case  0: SPD(p,18121,DIALOG_STYLE_INPUT,""o"HostName",""r"Napiš nové HostName (JmenoServeru):\n","Potvrdit","Zavrit");
case  1: SPD(p,13571,DIALOG_STYLE_INPUT,""o"GameModeText",""r"Napiš nové GameModeName Serveru:\n","Potvrdit","Zavrit");
case  2: SPD(p,15170,DIALOG_STYLE_INPUT,""o"MapName",""r"Napiš nové MapName Serveru):\n","Potvrdit","Zavrit");
case  3: SPD(p,19563,DIALOG_STYLE_INPUT,""o"ServerWebURL",""r"Napiš nové ServerWebURL:\n","Potvrdit","Zavrit");
case  4: SendRconCommand("password 12345");
case  5: SendRconCommand("password 0");
case  6: SendRconCommand("gravity 0.1");
case  7: SendRconCommand("gravity 0.0000000000000000009");
case  8: SendRconCommand("gravity 0.008");
case  9: SendRconCommand("gmx");
case 10: SendRconCommand("exit");
}
return 0;
}
//==============================================================================
if(dialogid == 18121 && response){ new s[128];
format(s,sizeof(s),"Hostname %s",inputtext);
SendRconCommand(s);
StringF(C,""r"[ SAF ] "w"HostName byl nastaven na: "c"%s",inputtext);
return 0;}
//==============================================================================
if(dialogid == 13571 && response){ new s[128];
format(s,sizeof(s),"gamemodetext %s",inputtext);
SendRconCommand(s);
StringF(C,""r"[ SAF ] "w"GameModeText serveru byl nastaven na: "c"%s",inputtext);
return 0;}
//==============================================================================
if(dialogid == 15170 && response){ new s[128];
format(s,sizeof(s),"mapname %s",inputtext);
SendRconCommand(s);
StringF(C,""r"[ SAF ] "w"MapName serveru byl nastaven na: "c"%s",inputtext);
return 0;}
//==============================================================================
if(dialogid == 19563 && response){ new s[128];
format(s,sizeof(s),"weburl %s",inputtext);
SendRconCommand(s);
StringF(C,""r"[ SAF ] "w"ServerWebURL byl nastaven na: "c"%s",inputtext);
return 0;}
//==============================================================================
if(dialogid == 13001 && response){
for(new i=0;i<MAX_PLAYERS;i++){ if(IPC(i)){
switch(listitem){
//====================
case 0: SCM(p,-1,""r"[ SAF ] "w"Všichni hráči byly zabiti !") && SPH(i,0);
//====================
case 1: SCM(p,-1,""r"[ SAF ] "w"Všem hráčům bylo doplněno HP !") && SPH(i,0);
//====================
case 2: SCM(p,-1,""r"[ SAF ] "w"Všem hráčům byla vzata vesta !") && SPA(i,0);
//====================
case 3: SCM(p,-1,""r"[ SAF ] "w"Všem hráčům byla dána vesta !") && SPA(i,100);
//====================
case 4: SCM(p,-1,""r"[ SAF ] "w"Všem hráčům byla zníčena vozidla !") && SVH(GetPlayerVehicleID(i), 0);
//====================
case 5: SCM(p,-1,""r"[ SAF ] "w"Všem hráčům byly opraveny vozidla !") && SVH(GetPlayerVehicleID(i), 1000.0);
//====================
case 6: SCM(p,-1,""r"[ SAF ] "w"Všichni hráči byly vyhozeni z vozidel") && RemovePlayerFromVehicle(i);
//====================
case 7:{
if(Freeze == 1) return SCM(p, -1,""r"[ SAF ] "w"Hráči už jsou zmraženi !");
SCM(p,-1,""r"[ SAF ] "w"Všichni hráči byly zmraženi !");
TogglePlayerControllable(i,0);
Freeze = 1;
}
//====================
case 8:{
if(Freeze == 0) return SCM(p, -1,""r"[ SAF ] "w"Hráči už jsou odzmraženi !");
SCM(p,-1,""r"[ SAF ] "w"Všichni hráči byly odmraženi !");
TogglePlayerControllable(i,1);
Freeze = 0;
}
//====================
case 9:{ SCM(p,-1,""r"[ SAF ] "w"Všem hráčům byly přiřazeny hodnosti !"); Hodnosti = 1; }
//====================
case 10:{ SCM(p,-1,""r"[ SAF ] "w"Všem hráčům byly odebrány hodnosti !"); Hodnosti = 0; }
//====================
case 11: SCM(p,-1,""r"[ SAF ] "w"Všichni hráči byly resetovany zbraně !") && RPW(i);
//====================
case 12: SCM(p,-1,""r"[ SAF ] "w"Všichni hráči byly resetovány peníze !") && RPM(i);
//====================
case 13: SCM(p,-1,""r"[ SAF ] "w"Všichni hráči byly posláni do jiného světa !")&& SetPlayerVirtualWorld(i,100);
//====================
case 14: SCM(p,-1,""r"[ SAF ] "w"Všichni hráči byly posláni zpět do světa")&& SetPlayerVirtualWorld(i,0);
//====================
}}}
return 0;
}
//==============================================================================
if(dialogid == 11002 && response){
switch(listitem){
//====================
case 0: SPD(p,91252,DIALOG_STYLE_INPUT,""o"Zpráva",""r"Napíš co by se mělo odeslat\n","Potvrdit","Zavrit");
//====================
case 1: SPD(p,19872,DIALOG_STYLE_INPUT,""o"Spawnout Vozidlo",""r"Napíš ID vozidla od 400 do 611\n","Potvrdit","Zavrit");
//====================
case 2:{
DestroyVehicle(Vozidlo[p]);
SCM(p,-1,""r"[ SAF ] "w"Vozidlo bylo úspěšně zníčeno !");
}
//====================
case 3:{
if(Prejmenovano[p] == 1) return SCM(p,-1,""r"[ SAF ] "w"Už jsi se přejmenoval !");
Jmeno[p] = PlayerName(p);
Prejmenovano[p] = 1;
SPN(p,""w"No_Name");
}
//====================
case 4:{
if(Prejmenovano[p] == 0) return SCM(p,-1,""r"[ SAF ] "w"Jsi už normálně přejmenovaný !");
Prejmenovano[p] = 0;
SPN(p,Jmeno[p]);
}}
return 0;
}
//==============================================================================
if(dialogid == 91252 && response){
if( !strlen(inputtext) ) return SCM(p,-1,""r"[ SAF ] "w"Nic jsi nezadal !");
new s[128];
format(s,sizeof(s),""r"%s",inputtext);
SCMTA(-1,s);
return 0;
}
//==============================================================================
if(dialogid == 10013 && response){
for(new i=0;i<MAX_PLAYERS;i++){ if(IPC(i)){
switch(listitem){
case 0:{
GPW(i,16,99999);
SCMTA(-1,""r"[ SAF ] "w"Všem hráčům bylo darováno: "c"Granát");
}
//====================
case 1:{
GPW(i,9,1);
SCMTA(-1,""r"[ SAF ] "w"Všem hráčům bylo darováno: "c"Motorová Pila");
}
//====================
case 2:{
GPW(i,38,99999);
SCMTA(-1,""r"[ SAF ] "w"Všem hráčům bylo darováno: "c"Minigum");
}
//====================
case 3:{
GPW(i,35,99999);
SCMTA(-1,""r"[ SAF ] "w"Všem hráčům bylo darováno: "c"Raketomet");
}
//====================
case 4:{
GPW(i,36,99999);
SCMTA(-1,""r"[ SAF ] "w"Všem hráčům bylo darováno: "c"Teplo-naváděcí Raketomet");
}
//====================
case 5:{
GPW(i,46,1);
SCMTA(-1,""r"[ SAF ] "w"Všem hráčům bylo darováno: "c"Padák");
}
//====================
}}}
return 0;
}
//==============================================================================
if(dialogid == 19872 && response){
new Float:x,Float:y,Float:z,s[128];
if( strval(inputtext) < 400 || strval(inputtext) > 611) return SCM(p,-1,""r"[ SAF ] "w"Maximům je 400-611 !");
else if( !strval(inputtext) ) return SCM(p,-1,""r"[ SAF ] "w"Nic jsi nezadal !");
else if(Spawnuto[p] == 1) return SCM(p,-1,""r"[ SAF ] "w"Už máš spawnuté vozidlo. Pro další musíš zníčit to stávájcí !");
GetPlayerPos(p,x,y,z);
Spawnuto[p] = 1;
Vozidlo[p] = CreateVehicle( strval(inputtext), x, y, z, 10.0, 0, 0, -1);
format(s,sizeof(s),""r"[ SAF ] "w"Úspěšně jsi si spawnul vozidlo ID: "r"%d", strval(inputtext) );
SCM(p, -1, s);
return 0;
}
//==============================================================================
if(dialogid == 10014 && response){
for(new i=0;i<MAX_PLAYERS;i++){ if(IPC(i)){
switch(listitem){
//====================
case 0:{
new s[850];
format(s,sizeof(s),""g"%s "r"[ ID: "c"%d "r"]\n",PlayerName(i),i);
SPD(p,8844,DIALOG_STYLE_LIST,""o"Informace",s,"Zavrit","");
}
//====================
case 1:{
new s[850];
format(s,sizeof(s),""g"%s "r"[ SkinID: "c"%d"r" VozidloID: "r"%d "w"]\n",PlayerName(i),i);
SPD(p,8845,DIALOG_STYLE_LIST,""o"Informace",s,"Zavrit","");
}
//====================
case 2:{
if(!IPA(i)){
SCM(p,-1,""r"[ SAF ] "w"Úspěšně byly vyhozeni všichni hráči !");
Kick(i);
}
}
//====================
case 3: SPD(p,15152,DIALOG_STYLE_INPUT,""o"Počasí",""r"Napiš nové počasí na serveru.Ale musíš pouze čísla !:\n","Potvrdit","Zavrit");
//====================
case 4: SPD(p,15153,DIALOG_STYLE_INPUT,""o"Počasí",""r"Napiš nový čas na serveru. Ale musíš pouze čísla !:\n","Potvrdit","Zavrit");
//====================
}}}
return 0;
}
//==============================================================================
if(dialogid == 15152 && response){
if( strval(inputtext) < 0 || strval(inputtext) > 45) return SCM(p,-1,""r"[ SAF ] "w"Maximům je 0-45 !");
else if( !strval(inputtext) ) return SCM(p,-1,""r"[ SAF ] "w"Nic jsi nezadal !");
new s[128];
format(s,sizeof(s),""r"[ SAF ] "w"Úspěšně jsi nastavil počasí na %d", strval(inputtext));
SCM(p,-1,s);
SetWeather(strval(inputtext));
return 0;
}
//==============================================================================
if(dialogid == 15153 && response){
if( strval(inputtext) < 0 || strval(inputtext) > 23) return SCM(p,-1,""r"[ SAF ] "w"Maximům je 0-23 !");
else if( !strval(inputtext) ) return SCM(p,-1,""r"[ SAF ] "w"Nic jsi nezadal !");
new s[128];
format(s,sizeof(s),""r"[ SAF ] "w"Úspěšně jsi nastavil čas na %d", strval(inputtext));
SCM(p,-1,s);
SetWorldTime(strval(inputtext));
return 0;
}
//==============================================================================
if(dialogid == 21121 && response){
for(new i=0;i<MAX_PLAYERS;i++){ if(IPC(i)){
switch(listitem){
//==========================
case 0:{
SetPlayerPos( i,2527.4963,-1667.7039,15.1689 );
SCM(p,-1,""r"[ SAF ] "w"Úspěšně jsi portnul všechny do "c"Los Santos");
}
//==========================
case 1:{
SetPlayerPos( i,-2025.8693,174.4509,28.8359 );
SCM(p,-1,""r"[ SAF ] "w"Úspěšně jsi portnul všechny do "c"San Fierra");
}
//==========================
case 2:{
SetPlayerPos( i,2129.0488,1433.6841,10.8203 );
SCM(p,-1,""r"[ SAF ] "w"Úspěšně jsi portnul všechny do "c"Las Venturas");
}
//==========================
case 3:{
if( IPA(i)){
SetPlayerPos( i,2527.4963,-1667.7039,15.1689 );
SCM(p,-1,""r"[ SAF ] "w"Úspěšně jsi portnul všechny RCON Administrátory do "c"Los Santos");
}}
//==========================
case 4:{
if( IPA(i)){
SetPlayerPos( i,-2025.8693,174.4509,28.8359 );
SCM(p,-1,""r"[ SAF ] "w"Úspěšně jsi portnul všechny RCON Administrátory do "c"San Fierra");
}}
//==========================
case 5:{
if( IPA(i)){
SetPlayerPos( i,2129.0488,1433.6841,10.8203 );
SCM(p,-1,""r"[ SAF ] "w"Úspěšně jsi portnul všechny RCON Administrátory do "c"Las Venturas");
}}}
}}
return 0;
}
//==============================================================================
return 0;
}
//==============================================================================
//==============================================================================

Link to comment
Share on other sites

4 odpovědí na tuto otázku

Recommended Posts

  • 0

Takhle to totiž nefunguje. Musíš napsat buď /hodnost id 0/1. 0 je pro normálního hráče a 1 pro admina.

 

Máš to napsané zde :

 

public OnPlayerText(p,text[]){
if(Hodnosti == 1)
{
new gs[144];
if(IPA(p)){
format(gs,sizeof(gs),""r"[ ~Admin~ ] %s"w" (ID:%d): %s",PlayerName(p),p,text);
SCMTA(-1,gs);
}else{
format(gs,sizeof(gs),""g"[ ~Hráč~ ] "w"%s (ID:%d): %s",PlayerName(p),p,text);
SCMTA(-1,gs);
}
return 0;
}
 
Link to comment
Share on other sites

  • 0

Už jsem to našel :

 

Špatný :

dcmd_hodnost(p,params[]){ new id,hodnost[30];
if( !IPA(p) ) return SCM(p, -1, ""r"[ SAF-Hodnost ] "w"Nejsi RCON Administrátor !");
else if( sscanf(params,"is",id,hodnost) ) return SCM(p,-1,""r"[ SAF-Hodnost ] "w"Špatně zadaný příkaz: "r"/hodnost [ID] [HODNOST] "w"!"); //Tady máš "is"
else if( !IPC(id) ) return SCM(p,-1,""r"[ SAF-Hodnost ] "w" Hráč není připojený !");
new s[128];
format(s,sizeof(s),""r"[ SAF-Hod ] "w"Úspešně si napsal hráči %s hodnost "c"%s",PlayerName(id),hodnost);
SCM(p,-1,s);
Hodnost[id] = hodnost;
return 1;
}

Správný :

dcmd_hodnost(p,params[]){ new id,hodnost[30];
if( !IPA(p) ) return SCM(p, -1, ""r"[ SAF-Hodnost ] "w"Nejsi RCON Administrátor !");
else if( sscanf(params,"i",id,hodnost) ) return SCM(p,-1,""r"[ SAF-Hodnost ] "w"Špatně zadaný příkaz: "r"/hodnost [ID] [HODNOST] "w"!"); // Tady máš správně "i"
else if( !IPC(id) ) return SCM(p,-1,""r"[ SAF-Hodnost ] "w" Hráč není připojený !");
new s[128];
format(s,sizeof(s),""r"[ SAF-Hod ] "w"Úspešně si napsal hráči %s hodnost "c"%s",PlayerName(id),hodnost);
SCM(p,-1,s);
Hodnost[id] = hodnost;
return 1;
}

Asi ses v tom hrabal a omylem si připsal "s". ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...