Help me with this, +rep if done.
#1

When i use /getgift in-game it says server unknown command. Also i need someone to modify as such that it's also gonna show how much time is left for the player to get a gift again.

Код:
#include<a_samp>
#include<zcmd>

new Random;

public OnFilterScriptInit()
{
      return 1;
}

public OnFilterScriptExit()
{
      return 1;
}

COMMAND:Getgift(playerid, params[])
{
    
     {
            Random = random(3);
            switch(Random)
            {
                  case 0: 
                  {
                          GivePlayerMoney(playerid, 200);
                          SendClientMessage(playerid, -1, "You opened a give and received $200.");
                  }
                  case 1: 
                  {
                          GivePlayerMoney(playerid, 500);
                          SendClientMessage(playerid, -1, "You opened a gift and received $500");
                  }
                  case 2: 
                  {       SetPlayerScore(playerid, GetPlayerScore(playerid)+2);
                          SendClientMessage(playerid, -1, "You opened a gift and received score.");
                  }
            }
            
     }
      SetTimerEx("EndGetgift", 10800000, true, "i", playerid);
     return 1;
}
forward EndGetgift(playerid);
 

public EndGetgift(playerid)
{

    return 1;
}
Reply


Messages In This Thread
Help me with this, +rep if done. - by Oxygenated - 14.09.2017, 15:23
Re: Help me with this, +rep if done. - by DrVenomous - 14.09.2017, 15:35
Re: Help me with this, +rep if done. - by Ultraz - 14.09.2017, 15:53
Re: Help me with this, +rep if done. - by Oxygenated - 14.09.2017, 17:45
Re: Help me with this, +rep if done. - by Sew_Sumi - 15.09.2017, 00:46
Re: Help me with this, +rep if done. - by Oxygenated - 15.09.2017, 03:00
Re: Help me with this, +rep if done. - by StaticYey - 15.09.2017, 05:34
Re: Help me with this, +rep if done. - by Oxygenated - 15.09.2017, 07:44
Re: Help me with this, +rep if done. - by BadJih - 15.09.2017, 09:56
Re: Help me with this, +rep if done. - by StaticYey - 15.09.2017, 11:59

Forum Jump:


Users browsing this thread: 2 Guest(s)