Jump to content

Sistem event .


StarRo
 Share

Recommended Posts

 

Am sa va dau un sistem de event-uri

 

New-uri:

 

 

new moneybag =0,moneybagp,moneybagp2,moneybagprem,moneybagpr2;

 

 

Comanda:

 

 

CMD:startevent(playerid, params[])
{
if(playerVariables[playerid][pAdminLevel] >= 2)
{
  ShowPlayerDialog(playerid, 2000, DIALOG_STYLE_LIST, "SERVER: Event", "Event NRG Stunt\nFind Objects", "Select", "Cancel");
}
else SCM(playerid, COLOR_GREY, "Aceasta comanda poate fi folosita doar de adminii cu level 2+.");
return 1;
}

Dialogurile

if(dialogid == 2000)
{
   if(response)
   {
 
         if(listitem == 0)
       {
           if(moneybag == 0)
           {
                    new string[2000];
moneybag = 1;
new Float: x,Float: y,Float: z;
GetPlayerPos(playerid,x,y,z);
   moneybagp2 =  SetPlayerCheckpoint(playerid, x+5,y,z, -1);
   moneybagprem = 4;
moneybagpr2 = 250000;
       format(string, sizeof(string), "AdmBot: %s a pornit un event de tip NRG Stunt, el se afla in zona %s.",GetName(playerid),GetPlayerZone(playerid));
       SendClientMessageToAll(COLOR_NEWSRP, string);
   }
   else SCM(playerid, COLOR_TEAL, "Deja este un event in desfasurare, nu poti incepe altu");
       }
       if(listitem == 1)
       {
       if(moneybag == 0)
       {
      ShowPlayerDialog(playerid, 2001, DIALOG_STYLE_LIST, "SERVER: Find Objects", "Premiu: Money\nPremiu: Respect\nPremiu: Premium Points", "Select", "Cancel");
}
else SCM(playerid, COLOR_TEAL, "Deja este un event in desfasurare, nu poti incepe altu");
}
   }
}
if(dialogid == 2001)
{
   if(response)
   {
       if(listitem == 0)
       {
        ShowPlayerDialog(playerid, 2002, DIALOG_STYLE_INPUT, "SERVER: Find Objects", "Scrie mai jos numarul de bani pentru premiu:", "Start", "Cancel");
}
if(listitem == 1)
       {
        ShowPlayerDialog(playerid, 2003, DIALOG_STYLE_INPUT, "SERVER: Find Objects", "Scrie mai jos numarul de respect points pentru premiu:", "Start", "Cancel");
}
if(listitem == 2)
       {
        ShowPlayerDialog(playerid, 2004, DIALOG_STYLE_INPUT, "SERVER: Find Objects", "Scrie mai jos numarul de puncte premium pentru premiu:", "Start", "Cancel");
}
}
}
if(dialogid == 2002)
{
   new text = strval(inputtext), string[2000];
   if(response)
   {
    if(IsNumeric(inputtext))
    {
    moneybag = 1;
new Float: x,Float: y,Float: z;
GetPlayerPos(playerid,x,y,z);
   moneybagp = CreatePickup(1550, 2, x+5,y,z, -1);
   moneybagprem = 1;
moneybagpr2 = text;
       format(string, sizeof(string), "AdmBot: %s a pornit un event de tip 'Find Objects', obiectul este pus in zona %s.",GetName(playerid),GetPlayerZone(playerid));
       SendClientMessageToAll(COLOR_NEWSRP, string);
    }
   }
}
if(dialogid == 2003)
{
   new text = strval(inputtext), string[184];
   if(response)
   {
    if(IsNumeric(inputtext))
    {
    moneybag = 1;
new Float: x,Float: y,Float: z;
GetPlayerPos(playerid,x,y,z);
   moneybagp = CreatePickup(1550, 2, x+5,y,z, -1);
   moneybagprem = 2;
moneybagpr2 = text;
       format(string, sizeof(string), "AdmBot: %s a pornit un event de tip 'Find Objects', obiectul este pus in zona %s.",GetName(playerid),GetPlayerZone(playerid));
       SendClientMessageToAll(COLOR_NEWSRP, string);
    }
   }
}
if(dialogid == 2004)
{
   new text = strval(inputtext), string[300];
   if(response)
   {
    if(IsNumeric(inputtext))
    {
    moneybag = 1;
new Float: x,Float: y,Float: z;
GetPlayerPos(playerid,x,y,z);
   moneybagp = CreatePickup(1550, 2, x+5,y,z, -1);
   moneybagprem = 3;
moneybagpr2 = text;
       format(string, sizeof(string), "AdmBot: %s a pornit un event de tip 'Find Objects', obiectul este pus in zona %s.",GetName(playerid),GetPlayerZone(playerid));
       SendClientMessageToAll(COLOR_NEWSRP, string);
    }
   }
}

OnPlayerPickUpPickup:

 

 

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(moneybag == 1)
{
if(pickupid == moneybagp)
   {
    new string[300],name[25];
       GetPlayerName(playerid,name,sizeof(name));
if(moneybagprem == 1)
{
   playerVariables[playerid][pMoney] += moneybagpr2;
   moneybag = 0;
       format(string, sizeof(string),"AdmBot: %s a gasit obiectul si a castigat $%s.",name,FormatNumber(moneybagpr2));
       SendClientMessageToAll(COLOR_NEWSRP, string);
       DestroyPickup(moneybagp);
       moneybagprem = 0;
       moneybagpr2 = 0;
  }
        if(moneybagprem == 2)
{
                playerVariables[playerid][pRPoints] += moneybagpr2;
   moneybag = 0;
       format(string, sizeof(string),"AdmBot: %s a gasit obiectul si a castigat %d respect points.",name,moneybagpr2);
       SendClientMessageToAll(COLOR_NEWSRP, string);
       DestroyPickup(moneybagp);
       moneybagprem = 0;
       moneybagpr2 = 0;
                }
if(moneybagprem == 3)
    {
                playerVariables[playerid][pPremiumPoints] += moneybagpr2;
   moneybag = 0;
       format(string, sizeof(string),"AdmBot: %s a gasit obiectul si a castigat %d premium points.",name,moneybagpr2);
       SendClientMessageToAll(COLOR_NEWSRP, string);
       DestroyPickup(moneybagp);
       moneybagprem = 0;
       moneybagpr2 = 0;
}
   }
}
return 1;
}

Unde este acea poza cu blue.bugged.ro puneti in loc de ea [ playerid ] legat .

 

Este facut de mine si L0K3D, cine ti-a dat voie sa postezi aici? Pune creditele.

Edited by Un4m3d
Link to comment
Share on other sites

Le-ai copiat, alea nu sunt facute de tine, sunt facute de Un4m3d. Tu nu stii sa creezi nici o comanda, nepoate, lasa-te de scripting, nu e pentru tine ;)

Wtf tu vorbeai ai copiat comanda pcolor din gm-ul lui masco :|

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. 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.