Szerző Téma: Reakció matek...  (Megtekintve 875 alkalommal)

Nem elérhető fbsokk

  • 427
    • Profil megtekintése
Reakció matek...
« Dátum: 2012. Március 31. - 16:44:32 »
0 Show voters
Sziasztok!
Valaki tudna nekem adni egy reakció és egy matek tesztet??

Nem elérhető Gabor..

  • 1883
  • Gabor..
    • Profil megtekintése
Reakció matek...
« Válasz #1 Dátum: 2012. Március 31. - 16:51:35 »
+2 Show voters
Tessék, találtam neked egy matek feladatosat:
 

#include <a_samp>
#if !defined YELLOW
#define YELLOW \\
    0xFFFF00AA
#endif
new feladat,stopped,bool:feladv;
forward feladvany(playerid);
forward fvege();
public OnFilterScriptInit()
{
    feladv = false;   SetTimer(\"feladvany\",150000,1);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
 
public feladvany(playerid)
{
if(feladv == false)   {
   KillTimer(stopped);
        feladv = true;new kocka[4],switching;
        kocka[0] = random(150);
        kocka[1] = random(150);
        kocka[2] = random(150);
switching = random(3);
if(switching == 0)   {
                        feladat = kocka[0] + kocka[1] + kocka[2];
                        new string[128];
                        format(string,128,\"« Feladvány: %d + %d + %d = ??? Jutalom: $1000 +5 Pont! Válasz adás: /va [válasz] »\",kocka[0],kocka[1],kocka[2]);
                        SendClientMessageToAll(YELLOW,\"Rossz Válasz Esetén: -5 Pont\");SendClientMessageToAll(YELLOW,string);
        }
        else if(switching == 1)   {
                        feladat = kocka[0] + kocka[1] - kocka[2];
                      new string[128];
                        format(string,128,\"« Feladvány: %d + %d - %d = ??? Jutalom: $1000 +5 Pont! Válasz adás: /va [válasz] »\",kocka[0],kocka[1],kocka[2]);
                       SendClientMessageToAll(YELLOW,string);SendClientMessageToAll(YELLOW,\"Rossz Válasz Esetén: -5 Pont\");
       }
        else if(switching == 2)   {
                        feladat = kocka[0] - kocka[1] - kocka[2];
                      new string[128];
                        format(string,128,\"« Feladvány: %d - %d - %d = ??? Jutalom: $1000 +5 Pont! Válasz adás: /va [válasz] »\",kocka[0],kocka[1],kocka[2]);
                       SendClientMessageToAll(YELLOW,string);SendClientMessageToAll(YELLOW,\"Rossz Válasz Esetén: -5 Pont\");
        }
        stopped = SetTimer(\"fvege\",60000,0);
        }
return 1;
}
public fvege()
{
        feladv = false;
        new string[128];
        format(string,128,\"« Feladat: A Válasz: %d! »\",feladat);
        SendClientMessageToAll(YELLOW,string);
        return 1;
}
 
CMD:felad(playerid,params[])
{
#pragma unused params
        if(IsPlayerAdmin(playerid))
        {
                feladv = false;
                feladvany(playerid);
        }
        else
        {
            SendClientMessage(playerid,YELLOW,\"« Sajnálom, de nem vagy RCON Adminisztrátor! »\");
            return 0;
        }
        return 1;
}
CMD:call(playerid,params[])
{
        if(feladv == true)
        {
            if(!strlen(params)) return SendClientMessage(playerid,YELLOW,\"Használat: /va [A Te válaszod]\");
            new para;
            para = strval(params);
            if(para == feladat)
            {
                feladv = false;
                new pName[24],
         string[128];
              KillTimer(stopped);
                GetPlayerName(playerid,pName,24);
                format(string,128,\"« Feladat: %s nyert! A Válasz: %d! »\",pName,feladat);
                SendClientMessageToAll(YELLOW,string);
                SetPlayerScore(playerid, GetPlayerScore(playerid) + 5 );
                GivePlayerMoney(playerid,1000);
                }   else   {
      SendClientMessage(playerid,YELLOW,\"« Helytelen Válasz »\");
      SetPlayerScore(playerid, GetPlayerScore(playerid) - 5 );
                }
           }
        else
        {
            return SendClientMessage(playerid,YELLOW,\"« A Feladatok Opció Nem aktív! »\");
        }
        return 1;
}

Nem elérhető nyE

  • 1745
    • Profil megtekintése
Reakció matek...
« Válasz #2 Dátum: 2012. Március 31. - 21:12:34 »
0 Show voters

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal