Üzenetek megjelenítése

Ez a szekció lehetővé teszi a felhasználó által írt összes hozzászólás megtekintését. Vedd figyelembe, hogy csak azokba a fórumokba írt hozzászólásokat látod, amelyekhez hozzáférésed van.


Üzenetek - Erik3333

Oldalak: 1 ... 46 47 [48] 49 50 ... 63
706
Segítségkérés / Licensz fájlból -> MySQL-ba
« Dátum: 2012. Május 13. - 14:04:42 »
Helló!
Hogyan tudnám megcsinálni, hogy a licenszt ne fájlból olvassa ki, hanem MySQL-ból?
Itt a fájlból kiolvasás:
 
   if(!fexist(\"license.txt\"))
{
    print(\"===================[Licensz Ellenõrzése]===================\");
    print(\" Kritikus Hiba!! Licenszfájl nem található, a script leáll!\");
    print(\"===================[Licensz Ellenõrzése]===================\");
    SendRconCommand(\"exit\");
}
new File:licenszfajl, Kod[256];
licenszfajl = fopen(\"license.txt\", filemode:io_read);
while(fread(licenszfajl, Kod, 256))
{
if(strcmp(Kod,\"asdasdasdasdasd123123123123123\", true) == 0)
{
            print(\"==============[Licensz Ellenõrzése]==============\");
   print(\" Licensz megfelelõ, a script futása engedélyezve!\");
   print(\"==============[Licensz Ellenõrzése]==============\");
}
else
{
            print(\"=========[Licensz Ellenõrzése]=========\");
   print(\" Hibás Licensz!! Ezért a script leáll!\");
    print(\"=========[Licensz Ellenõrzése]=========\");
    SendRconCommand(\"exit\");
}
}

 

Dupla hozzászólás automatikusan összefûzve. ( 2012. Május 13. - 22:19:02 )

Valaki?

707
Ha admin vagyok, és nem vagyok adminsegéd, akkor nem tudom használni a parancsot.
De ha admin, és adminsegéd is vagyok, akkor tudom használni.

708
Helló!
Van 1-2 parancsom, amit ha admin vagyok, de nem vagyok adminsegéd, akkor nem tudom használni...
 
CMD:warn(playerid, params[])
{
if(GetPlayerAdminLevel(playerid) < 1 || !IsAdminSeged(playerid)) return SendClientMessage(playerid, COLOR_ERROR, \"Nem használhatod ezt a parancsot!\");
{
    new player, indok[128];
if(sscanf(params, \"us[128]\", player, indok)) return SendClientMessage(playerid, COLOR_ERROR, \"Használat: /warn [Név/ID] [indok]\");
else if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_ERROR, \"A játékos nincs csatlakozva!\");
{
   if(GetPlayerAdminLevel(playerid) < GetPlayerAdminLevel(player)) //return SendClientMessage(playerid, COLOR_ERROR, \"Nagyobb admint akarsz kickelni?!\");
   {
            new string[128];
      SendClientMessage(playerid, COLOR_ERROR, \"Nagyobb admint akarsz warnolni?\");
            format(string, sizeof(string), \"%s ki lett kickelve a rendszer által által | Indok: Nagyobb admint akarsz warnolni? Mekkora egy kretén vagy...\", PlayerName(playerid));
      SendClientMessageToAll(COLOR_INFO, string);
             format(string, sizeof(string), \"%s warnolni akart!\", PlayerName(playerid));
      SendClientMessage(player, COLOR_ERROR, string);
      printf(\"<<%s ki lett kickelve a rendszer által által | Indok: Nagyobb admint akarsz warnolni? Mekkora egy kretén vagy... >>\", PlayerName(playerid));
      Kick(playerid);
   }
   new string[128];
   PlayerData[player][Warnings]++;
           if(PlayerData[player][Warnings] <= 2)
          {
      format(string, sizeof(string), \"%s warnolt (%d/3) | Indok: %s\", PlayerName(playerid), PlayerData[player][Warnings], indok);
      SendClientMessage(player, COLOR_INFO, string);
      format(string, sizeof(string), \"Warnoltad %s-t (%d/3) | Indok: %s\", PlayerName(player), PlayerData[player][Warnings], indok);
      SendClientMessage(player, COLOR_WHITE, string);
      format(string, sizeof(string), \"<< %s warnolva lett %s által (%d/3) | Indok: %s >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings], indok);
      SendClientMessageToAdmins(COLOR_RED, string);
      printf(\"<< %s warnolva lett %s által (%d/3) | Indok: %s >>\", PlayerName(player), PlayerName(playerid), PlayerData[player][Warnings], indok);
          }
   else
   {
      format(string, sizeof(string), \"%s ki lett kickelve a rendszer által | Indok: Összegyûlt 3 warn\", PlayerName(player));
      SendClientMessageToAll(COLOR_INFO, string);
      SendClientMessage(player, COLOR_RED, \"Összegyûlt a 3 warn-od, ezért kickelt a rendszer!\");
      Kick(player);
   }
}
}
return true;
}

709
Segítségkérés / Szerveren player számláló rosszul számol
« Dátum: 2012. Május 13. - 12:14:33 »
         new Text: mps;
          new pCount = 0;
          new maxplayers[ 128 ]; 
          public OnGameModeInit() 
          {
            mps = TextDrawCreate(88.000000, 320.000000, \"Jatekosok x - 64\");
            TextDrawAlignment(mps, 2);
            TextDrawBackgroundColor(mps, -16776961);
            TextDrawFont(mps, 1);
            TextDrawLetterSize(mps, 0.559997, 2.499999);
            TextDrawColor(mps, 255);
            TextDrawSetOutline(mps, 1);
            TextDrawSetProportional(mps, 1);
          }
          public OnPlayerConnect(playerid) 
          { 
              for ( new g = 0; g < GetMaxPlayers( ); g++ ) if ( IsPlayerConnected ( g ) ) pCount++;
              format (maxplayers, sizeof ( maxplayers ), \"Jatekosok: %i / 64\", pCount ); 
              TextDrawSetString ( mps, maxplayers ); 
              TextDrawColor (mps,0xFF0000AA ); 
              TextDrawShowForPlayer (playerid, mps ); 
              return 1; 
          }     
           public OnPlayerDisConnect( playerid, reason ) 
          {
              for ( new g = 0; g < GetMaxPlayers( ); g++ ) if ( IsPlayerConnected ( g ) ) pCount--;
              format (maxplayers, sizeof ( maxplayers ), \"Jatekosok: %i / 64\", pCount );
     
              TextDrawSetString ( mps, maxplayers );
     
              TextDrawColor (mps,0xFF0000AA );
    .
              TextDrawShowForPlayer (playerid, mps );
     
               return 1;
     
          }

710
Segítségkérés / miért írja ezt az error-t?
« Dátum: 2012. Május 13. - 11:05:33 »
Azért, mert a \"goto\" parancsot mág használod a módban/scriptben!
 
A [*code] [/code*] tag használata kötelezõ! (Csillag nélkül!)[/quote]

711
Segítségkérés / Kisebb kérdések
« Dátum: 2012. Május 13. - 09:25:44 »
Idézetet írta: N@rbirock date=1336893620\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"11181\" data-ipsquote-contentclass=\"forums_Topic
Hogy lehet megcsinálni, hogya player ne látszodjon a térképen és hogy az ember fölöt ne legyen a neve és az élete?
 

if (strcmp(\"/nameoff\", cmdtext, true) == 0)
{
    for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
    GameTextForPlayer(playerid, \"~W~Nametags ~R~off\", 5000, 5);
    return 1;
}

712
Segítségkérés / Parancs bug
« Dátum: 2012. Május 13. - 08:43:52 »
Helló!
Van egy vehslap parancsom, és az a baj vele, hogyha adok valakinek, akkor nem írja ki, hogy kinek adtam
 
CMD:vehslap(playerid, params[])
{
    if(GetPlayerAdminLevel(playerid) < 2) return SendClientMessage(playerid, COLOR_ERROR, \"Nem használhatod ezt a parancsot!\");
    {
new player;
if(sscanf(params, \"u\", player)) return SendClientMessage(playerid, COLOR_ERROR, \"Használat: /vehslap [Név/ID]\");
if(!IsPlayerInAnyVehicle(player)) return SendClientMessage(player, COLOR_ERROR, \"A játékos nincs autóban!\");
else if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COLOR_ERROR, \"A játékos nincs csatlakozva!\");
{
   new string[128];
    new Float:gtpx,Float:gtpy,Float:gtpz;
   format(string, sizeof(string), \"%s autópacsit adott.\", PlayerName(playerid));
   SendClientMessage(player, COLOR_WHITE, string);
   format(string, sizeof(string), \"Sikeresen adtál %s-nek autópacsit!\", PlayerName(player));
   SendClientMessage(playerid, COLOR_INFO, string);
   format(string, sizeof(string), \"<< %s autópacsit adott neki: %s >>\", PlayerName(playerid), PlayerName(player));
   SendClientMessageToAdmins(COLOR_RED, string);
   player = GetPlayerVehicleID(playerid);
   GetVehiclePos(player, gtpx, gtpy, gtpz);
   SetVehiclePos(player, gtpx, gtpy, gtpz+5);
   PlayerPlaySound(player, 1130, gtpx, gtpy, gtpz+5);
   printf(\"<< %s autópacsit adott %s-nek >>\", PlayerName(playerid), PlayerName(player));
}
}
return true;

 
ChatLog:
 
[08:40:32] << TheMesziErik autópacsit adott neki:  >>
[08:41:37] Sikeresen adtál -nek autópacsit!
[08:41:37] << TheMesziErik autópacsit adott neki:  >>
[08:41:41] Sikeresen adtál -nek autópacsit!
[08:41:41] << TheMesziErik autópacsit adott neki:  >>
[08:41:43] Sikeresen adtál -nek autópacsit!
[08:41:43] << TheMesziErik autópacsit adott neki:  >>
[08:41:45] Sikeresen adtál -nek autópacsit!
[08:41:46] << TheMesziErik autópacsit adott neki:  >>
[08:41:47] Sikeresen adtál -nek autópacsit!
[08:41:47] << TheMesziErik autópacsit adott neki:  >>
[08:41:51] Sikeresen adtál -nek autópacsit!
[08:41:51] << TheMesziErik autópacsit adott neki:  >>
[08:41:58] Sikeresen adtál -nek autópacsit!
[08:41:58] << TheMesziErik autópacsit adott neki:  >>
[08:41:59] Sikeresen adtál -nek autópacsit!
[08:41:59] << TheMesziErik autópacsit adott neki:  >>
[08:41:59] Sikeresen adtál -nek autópacsit!
[08:41:59] << TheMesziErik autópacsit adott neki:  >>
[08:42:00] Sikeresen adtál -nek autópacsit!
[08:42:00] << TheMesziErik autópacsit adott neki:  >>

713
Fórum Archívum (Témák/Fórumok) / Re:Nem találom
« Dátum: 2012. Május 13. - 07:34:53 »
Egy próbát megér:
 
Idézetet írta: Erik3333 date=1336817560\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21379\" data-ipsquote-contentclass=\"forums_Topic
Ezzel próbáld meg:
 
stock PlayerToPoint(Float:radi, playerid, Float, Float:y, Float:z)
{
new Floatldposx, Floatldposy, Floatldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
return 0;
}

 
Vagy:
 

forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
//printf(\"DEBUG: X:%f Y:%f Z:%f\",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
   return 1;
}
}
return 0;
}

 


714
Segítségkérés / Nem találom
« Dátum: 2012. Május 12. - 22:48:05 »
Idézetet írta: ZyZu date=1336848588\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21324\" data-ipsquote-contentclass=\"forums_Topic
De lehet éppen az a hiba benne nem a zárás..
 
Szerintem is, mert az angol fórumra is ezeket írták ki(stock, public).

715
Fórum Archívum (Témák/Fórumok) / Re:RPG szervert akarok csinalni
« Dátum: 2012. Május 12. - 17:10:42 »
Idézetet írta: Indi date=1336835092\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21361\" data-ipsquote-contentclass=\"forums_Topic
Manapság elõbb akarnak servert nyitni és megtanulni scriptelni, mint hogy a Magyar Nyelvtan alapjait megtanulnák...
 
Kb...

716
Segítségkérés / Parancs írás
« Dátum: 2012. Május 12. - 16:05:43 »
Így?
 
CMD:szabalyok(playerid, params[])
{
SendClientMessage(playerid, COLOR_WHITE, \"[WS]RELOADED: 1. NO DB, 2. Ne káromkodj, 3. Ne csalj!, 4. Tiszteld a többi játékost\");
SendClientMessage(playerid, COLOR_WHITE, \"[WS]RELOADED: Aki nem tartja be a fent lévõ szabályokat azt kitiljtuk a szerverrõl!\");
return 1;
}

717
Segítségkérés / Warn-nál ne lehessen mínuszba menni
« Dátum: 2012. Május 12. - 16:00:01 »
Idézetet írta: ZyZu date=1336830738\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21345\" data-ipsquote-contentclass=\"forums_Topic
Ezt a sort átírod ++ -ra!
 

PlayerData[player][Warnings]--;

 

Annak sok értelme nem lenne, mert akkor nem ad, hanem elvesz warningot!
Így lehetne megcsinálni?
 
         if(PlayerData[player][Warnings] == 0)
   {
       return SendClientMessage(playerid, COLOR_INFO, \"0-nál kevesebb nem lehet a warning-ja!\");
   }

718
Segítségkérés / Parancs írás
« Dátum: 2012. Május 12. - 15:50:40 »
Így próbáld meg:
 
if (strcmp(\"/szabályok\", cmdtext, true))
   {
    SendClientMessage(playerid, COLOR_WHITE, \"[WS]RELOADED: 1. NO DB, 2. Ne káromkodj, 3. Ne csalj!, 4. Tiszteld a többi játékost\");
    SendClientMessage(playerid, COLOR_WHITE, \"[WS]RELOADED: Aki nem tartja be a fent lévõ szabályokat azt kitiljtuk a szerverrõl!\");
return 1;
}

719
Fórum Archívum (Témák/Fórumok) / Re:RPG szervert akarok csinalni
« Dátum: 2012. Május 12. - 15:45:46 »
Inkább ne, amíg nem vagy haladó/profi scripter!

720
Segítségkérés / Spawn hely
« Dátum: 2012. Május 12. - 15:44:24 »
Szerintem próbáld meg simán SAMP-ben lementeni /save-vel.
Felmész egy szerverre, és úgy.

Oldalak: 1 ... 46 47 [48] 49 50 ... 63
SimplePortal 2.3.7 © 2008-2024, SimplePortal