Jump to content
  • 0

Comanda /spawnweapon gm burned



Salu, cand dau /spawnweapon doresc sa numai pun si numarul de gloante, vreau sa imi puna gloante infinite, aveti comanda aici:

YCMD:spawnweapon(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid,COLOR_WHITE, AdminOnly);
    new id,gun,ammo,string[100],sendername[30],giveplayer[30];
    if(sscanf(params, "uii",id,gun,ammo)) return SCM(playerid,COLOR_GREY, "Sintaxa: {FFFFFF}/spawnweapon <Nume/ID> <Weapon ID> <Gloante>");
    if(gun < 1||gun > 46||gun==19||gun==20||gun==21||gun==45) return SCM(playerid,COLOR_WHITE,"Invalid weapond ID.");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");
    if(PlayerInfo[id][pGunLic] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Acel player nu are licenta de arme.");
    ServerWeapon(id, gun, ammo);
    GetPlayerName(id, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new gunname[32];
    GetWeaponName(gun, gunname, 32);
    format(string, sizeof(string), "({FF0000}Admin Info{FFFFFF}) %s i-a dat lui %s arma %s (%d ammo).",sendername,giveplayer,gunname, ammo);
    if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_WHITE, string,3);
    if(GetPlayerState(id) == PLAYER_STATE_PASSENGER) {
        new gun2,tmp;
        #pragma unused tmp
        else SetPlayerArmedWeapon(id,0);
    return 1;

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

salut in codul postat de tine ai o variabila numita ammo stergeo de peste tot din cod doar ea nimic altceva apoi sterge din scanf ultimul de la "uii"  iar de la giveplayerweapon din moment ce ai sters variabila pune 100 care 100 inseamna 100 de gloante logic nu?  iar in format message unde scrie %d gloante stergi %d  si scrii 100


    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
Pagina     Scripting     pawn
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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. For more details you can also review our Terms of Use and Privacy Policy.