Jump to content
  • 0

Problema comanda


MytzaMytz

Question

  • Problema intalnita (descriere): Am incercat sa pun o comanda de give gun si imi da eroarea de mai jos.
  • Ero(area / rile) / warning-(ul / urile):
error 012: invalid function call, not a valid address
warning 215: expression has no effect
warning 215: expression has no effect
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
  • Liniile de cod / sursa / script-ul:
ABroadCast(COLOR_LIGHTRED,string,1);
  • Imagini / Video (optional): -
  • Ati incercat sa rezolvati singur?: Da.
Edited by MytzaMytz
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
  • 0

Are, uite toate comanda:

if(strcmp(cmd, "/agivegun", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SCM(playerid, COLOR_LIGHT, "USAGE: /agivegun [playerid/PartOfName] [weaponid(eg. 46 = Parachute)] [ammo]");
                SendClientMessage(playerid, COLOR_LIGHT, "   ");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 1 = Fists                     ID : 2 = Golf Club");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 3 = Night Stick              ID : 4 = Knife");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 5 = Bata                     ID : 6 = Lopata");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 7 = Pool Cue                 ID : 8 = Katana");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 9 = Fierastrau               ID : 10 = Purple Dildo");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 11 = S White Vibrator        ID : 12 = L White Vibrator");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 13 = Silver Vibrator            ID : 14 = Flowers");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 15 = Baston                  ID : 31 = M4");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 16 = Grenazi                 ID : 32 = Tec9");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 17 = Smoke Grenade           ID : 33 = Country Rifle");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 18 = Molotov                 ID : 34 = Sniper Rifle");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 19 = Vehicle Missile         ID : 35 = Rocket Launcher");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 20 = Hydra Flare             ID : 36 = HS Rocket Launcher");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 21 = Jetpack                 ID : 37 = Flame Thrower");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 22 = 9mM                     ID : 38 = Mini Gun");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 23 = Silenced 9mm            ID : 39 = Satchel Charge");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 24 = Desert Eagle            ID : 40 = Detonator");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 25 = Shotgun                 ID : 41 = Spray can");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 26 = Sawnoff Shotgun         ID : 42 = Fire Extinguisher");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 27 = Combat Shotgun          ID : 43 = Camera");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 28 = Micro SMG (Mac 10)      ID : 44 = Nightvision Goggles");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 29 = SMG (MP5)               ID : 45 = Infrared Vision");
                SendClientMessage(playerid, COLOR_LIGHT, "ID : 30 = AK47 (Kalashnikov)      ID : 46 = Parachute");
                return 1;
            }
            new playa;
            new gun;
            new ammo;
            playa = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            gun = strval(tmp);
            if(!strlen(tmp))
            {
                SCM(playerid, COLOR_GREY, "USAGE: /agivegun [playerid/PartOfName] [weaponid] [ammo]");
                SCM(playerid, COLOR_LIGHT, "3(Club) 4(knife) 5(bat) 6(Shovel) 7(Cue) 8(Katana) 10-13(Dildo) 14(Flowers) 16(Grenades) 18(Molotovs) 22(Pistol) 23(SPistol)");
                SCM(playerid, COLOR_LIGHT, "24(Eagle) 25(shotgun) 29(MP5) 30(AK47) 31(M4) 33(Rifle) 34(Sniper) 37(Flamethrower) 41(spray) 42(exting) 43(Camera) 46(Parachute)");
                return 1;
            }
            if(gun < 1||gun > 46||gun==27||gun==1||gun==2||gun==9||gun==17||gun==19||gun==20||gun==21||gun==36||gun==38||gun==39||gun==40||gun==44||gun==45)
            { SCM(playerid, COLOR_RED, "   wrong WeaponID!"); return 1; }
            tmp = strtok(cmdtext, idx);
            ammo = strval(tmp);
            if(ammo <1||ammo > 999)
            { SCM(playerid, COLOR_RED, "   dont go below 1 or above 999 bullets!"); return 1; }
            if(playerVariables[playerid][pAdminLevel] < 2)
            {
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        GivePlayerWeapon(playa, gun, ammo);
                        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        format(string, 256, "[AdmWarning]: %s has given %s gun id %d.", sendername,giveplayer,gun);
                        ABroadCast(COLOR_RED,string,1); // Linia cu eroare
                    }
                }
            }
        }
        return 1;
    }
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.