AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Buying with gunxp (https://forums.alliedmods.net/showthread.php?t=250787)

zDac 10-30-2014 13:25

Buying with gunxp
 
Hi, is it possible to make, when a player writes /ak47, he gets ak47. But he doesn't buy with money ($), he buys with XP. Can someone make a code and post here, with xbatista's gun xp mod?

wickedd 10-30-2014 15:00

Re: Buying with gunxp
 
Yes it's possible, but this sound like a request. I think you are posting in the wrong forum.

bat 11-02-2014 05:30

Re: Buying with gunxp
 
Example:
Code:

#include amxmodx
#include fun

const COST = 14 // Cost ak47
new getusexp[33] // XP

public plugin_init()
        register_clcmd("say /ak47", "buyak")

public buyak(client){
        if(getusexp[client] < COST)
            return;
               
        if(user_has_weapon(client, CSW_AK47))
            return;
               
        give_item(client, "weapon_ak47")
        give_item(client, "ammo_762nato")
        give_item(client, "ammo_762nato")
        give_item(client, "ammo_762nato")       
}



All times are GMT -4. The time now is 17:44.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.