Been looking for about an hour.
#4

pawn Код:
#include <a_samp>

//#############################
//##    Change these:   ##
//#############################

#define GUNID 27
#define GUNCOST 1000
#define AMMO 500
#define COLOR 0xFF00FFFF

//#############################

new String[128];

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/buyspaz", cmdtext, true, 10) == 0)
    {
        if(GetPlayerMoney(playerid) >= GUNCOST)
        {
          GivePlayerWeapon(playerid, GUNID, AMMO);
          GivePlayerMoney(playerid, -GUNCOST);
          SendClientMessage(playerid, COLOR, "Enjoy your spaz!");
        }
        else
        {
          format(String, sizeof(String), "You need at least %d to buy a Spaz!", GUNCOST);
          SendClientMessage(playerid, COLOR, String);
        }
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
Been looking for about an hour. - by whereschris - 08.07.2009, 22:06
Re: Been looking for about an hour. - by Chaprnks - 08.07.2009, 22:13
Re: Been looking for about an hour. - by whereschris - 08.07.2009, 22:16
Re: Been looking for about an hour. - by Weirdosport - 08.07.2009, 22:17
Re: Been looking for about an hour. - by Chaprnks - 08.07.2009, 22:19
Re: Been looking for about an hour. - by whereschris - 08.07.2009, 22:19
Re: Been looking for about an hour. - by Weirdosport - 08.07.2009, 22:19
Re: Been looking for about an hour. - by Chaprnks - 08.07.2009, 22:20
Re: Been looking for about an hour. - by whereschris - 08.07.2009, 22:22
Re: Been looking for about an hour. - by Chaprnks - 08.07.2009, 22:23

Forum Jump:


Users browsing this thread: 2 Guest(s)