1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. GTA Network forum is now in archive mode.

SA-MP Player ID System

Discussion in 'Scripts' started by StreetGT, Jan 4, 2017.

Tags:
  1. Ficho

    Ficho New Member Donator

    Messages:
    3
    Likes Received:
    0
    Joined:
    Apr 13, 2017
    Something is wrong ?
    on command weapons...

    And on my command:


    Weapons command:

    Code:
    
    [Command("giveweapon", "~y~USAGE: ~w~/giveweapon [id/PartOfName] [weapon]", GreedyArg = true)]
            public void GiveWeaponCommand(Client sender, string idOrName, WeaponHash weapon)
            {
    
                    Client target = API.exported.playerids.findPlayer(sender, idOrName);
                    API.givePlayerWeapon(target, weapon, 9999, true, true);
               
            }
    
    Givemoney command:

    Code:
    [Command("givemoney", "~y~USAGE: ~w~/givemoney [id/PartOfName] [Value]", GreedyArg = true)]
            public void CMD_UserMoney(Client sender, string idOrNamea, int iznos)
            {
                if (sender.getData("Logiran") == 0)
                {
                    API.sendChatMessageToPlayer(sender, "You're not logged in!");
                }
                else
                {
                    if(sender.name == "Filip_Wizzy")
                    {
                        Client targeta = API.exported.playerids.findPlayer(sender, idOrNamea);
                        Console.Write("\n A:" + targeta);
                        /*int trenutno = API.getEntityData(player, "Novac");
                        API.setEntityData(player, "Novac",  trenutno+iznos);
                        API.shared.triggerClientEvent(player, "update_money_display", API.shared.getEntityData(player, "Novac"));
                        API.sendChatMessageToPlayer(target, "~y~Administrator ~w~" + player.name + " gave you ~g~"+iznos +"$");
                        API.sendChatMessageToPlayer(player, "You gave " + target.name + " a ~g~" + iznos + "$");*/
                    }
                    else
                    {
                        API.sendChatMessageToPlayer(sender, "Samo ficho moze koristiti ovu komandu!");
                    }
                }
            }
    
    most confusing part is that command /id works fine with ID or name....
     
  2. Tr4m3r

    Tr4m3r New Member

    Messages:
    3
    Likes Received:
    1
    Joined:
    Apr 22, 2017
    works fine, Thank you.
     

Share This Page