How can i fix this errors?
#1

Code:
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(28058) : warning 219: local variable "idcar" shadows a variable at a preceding level
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(54912) : warning 217: loose indentation
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(54953) : error 017: undefined symbol "GivePlayerAdminGun"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(54962) : warning 217: loose indentation
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55002) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55003) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55004) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55005) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55006) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55007) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55008) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55009) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55023) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55024) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55025) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55039) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55040) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55041) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55054) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55055) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55068) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55069) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55083) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55084) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55085) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55100) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55101) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55102) : error 017: undefined symbol "GivePlayerWeaponAll"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(55103) : error 017: undefined symbol "GivePlayerWeaponAll"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Line 54912-55172
pawn Code:
if(strcmp(cmd, "/givegun", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 4)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givegun [playerid/PartOfName] [weaponid]");
                return 1;
            }
            new playa;
            new gun;
            playa = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            gun = strvalEx(tmp);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
                SendClientMessage(playerid, COLOR_GRAD1, "1: Brass Knuckles 2: Golf Club 3: Nite Stick 4: Knife 5: Baseball Bat 6: Shovel 7: Pool Cue 8: Katana 9: Chainsaw");
                SendClientMessage(playerid, COLOR_GRAD2, "10: Purple Dildo 11: Small White Vibrator 12: Large White Vibrator 13: Silver Vibrator 14: Flowers 15: Cane 16: Frag Grenade");
                SendClientMessage(playerid, COLOR_GRAD3, "17: Tear Gas 18: Molotov Cocktail 19: Vehicle Missile 20: Hydra Flare 21: Jetpack 22: 9mm 23: Silenced 9mm 24: Deagle");
                SendClientMessage(playerid, COLOR_GRAD4, "26: Sawnoff Shotgun 27: Combat Shotgun 28: Micro SMG (Mac 10) 29: SMG (MP5) 30: AK-47 31: M4 32: Tec9 33: Country Rifle");
                SendClientMessage(playerid, COLOR_GRAD5, "25: Shotgun 34: Sniper Rifle 35: Rocket Launcher 36: HS Rocket Launcher 37: Flamethrower 38: Minigun 39: Satchel Charge");
                SendClientMessage(playerid, COLOR_GRAD6, "40: Detonator 41: Spraycan 42: Fire Extinguisher 43: Camera 44: Nightvision Goggles 45: Infared Goggles 46: Parachute");
                SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
                return 1;
            }
            if(gun < 1||gun > 46) { SendClientMessage(playerid, COLOR_GRAD1, "   Invalid weaponid !"); return 1; }
            if(IsPlayerConnected(playa))
            {
                if(gun == 21)
                {
                    SetPlayerSpecialAction(playa,SPECIAL_ACTION_USEJETPACK);
                }
                else
                {
                    GivePlayerAdminGun(playa, gun);
                }
                GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "   You have given gun %d to %s!", gun,giveplayer);
                SendClientMessage(playerid, COLOR_GREY, string);
            }
        }
        return 1;
    }
    if(strcmp(cmd, "/givegunall", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 4)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp)) {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givegunall [type] [number]");
                SendClientMessage(playerid, COLOR_GRAD1, "1: Meelee");
                SendClientMessage(playerid, COLOR_GRAD1, "2: Pistols");
                SendClientMessage(playerid, COLOR_GRAD2, "3: Shotguns");
                SendClientMessage(playerid, COLOR_GRAD2, "4: Rifles");
                SendClientMessage(playerid, COLOR_GRAD2, "5: Machine Guns");
                SendClientMessage(playerid, COLOR_GRAD3, "6: Assault");
                SendClientMessage(playerid, COLOR_GRAD3, "7: Heavy Assault");
                SendClientMessage(playerid, COLOR_GRAD3, "8: Explosives");
                SendClientMessage(playerid, COLOR_GRAD4, "9: Special");
                return 1;
            }
            new type = strvalEx(tmp);
            if(type == 1)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givegunall [type] [number]");
                    SendClientMessage(playerid, COLOR_GRAD1, "1: Golf Club");
                    SendClientMessage(playerid, COLOR_GRAD1, "2: Nite Stick");
                    SendClientMessage(playerid, COLOR_GRAD2, "3: Knife");
                    SendClientMessage(playerid, COLOR_GRAD2, "4: Baseball Bat");
                    SendClientMessage(playerid, COLOR_GRAD3, "5: Shovel");
                    SendClientMessage(playerid, COLOR_GRAD3, "6: Pool Cue");
                    SendClientMessage(playerid, COLOR_GRAD4, "7: Katana");
                    SendClientMessage(playerid, COLOR_GRAD4, "8: Cane");
                    return 1;
                }
                new number = strvalEx(tmp);
                if(number == 1) { GivePlayerWeaponAll(2, 999999); }
                else if(number == 2) { GivePlayerWeaponAll(3, 999999); }
                else if(number == 3) { GivePlayerWeaponAll(4, 999999); }
                else if(number == 4) { GivePlayerWeaponAll(5, 999999); }
                else if(number == 5) { GivePlayerWeaponAll(6, 999999); }
                else if(number == 6) { GivePlayerWeaponAll(7, 999999); }
                else if(number == 7) { GivePlayerWeaponAll(8, 999999); }
                else if(number == 8) { GivePlayerWeaponAll(15, 999999); }
                else { return 0; }
            }
            if(type == 2)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givegunall [type] [number]");
                    SendClientMessage(playerid, COLOR_GRAD1, "1: Silenced Pistol");
                    SendClientMessage(playerid, COLOR_GRAD1, "2: Duel Pistols");
                    SendClientMessage(playerid, COLOR_GRAD2, "3: Desert Eagle");
                    return 1;
                }
                new number = strvalEx(tmp);
                if(number == 1) { GivePlayerWeaponAll(23, 999999); }
                else if(number == 2) { GivePlayerWeaponAll(22, 999999); }
                else if(number == 3) { GivePlayerWeaponAll(24, 999999); }
                else { return 0; }
            }
            if(type == 3)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givegunall [type] [number]");
                    SendClientMessage(playerid, COLOR_GRAD1, "1: Shotgun");
                    SendClientMessage(playerid, COLOR_GRAD1, "2: SPAS12");
                    SendClientMessage(playerid, COLOR_GRAD2, "3: Sawnoff Shotgun");
                    return 1;
                }
                new number = strvalEx(tmp);
                if(number == 1) { GivePlayerWeaponAll(25, 999999); }
                else if(number == 2) { GivePlayerWeaponAll(27, 999999); }
                else if(number == 3) { GivePlayerWeaponAll(26, 999999); }
                else { return 0; }
            }
            if(type == 4)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givegunall [type] [number]");
                    SendClientMessage(playerid, COLOR_GRAD1, "1: Country Rifle");
                    SendClientMessage(playerid, COLOR_GRAD1, "2: Sniper Rifle");
                    return 1;
                }
                new number = strvalEx(tmp);
                if(number == 1) {GivePlayerWeaponAll(33, 999999); }
                else if(number == 2) { GivePlayerWeaponAll(34, 999999); }
                else { return 0; }
            }
            if(type == 5)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givegunall [type] [number]");
                    SendClientMessage(playerid, COLOR_GRAD1, "1: Micro SMG");
                    SendClientMessage(playerid, COLOR_GRAD1, "2: Tec9");
                    return 1;
                }
                new number = strvalEx(tmp);
                if(number == 1) { GivePlayerWeaponAll(28, 999999); }
                else if(number == 2) { GivePlayerWeaponAll(32, 999999); }
                else { return 0; }
            }
            if(type == 6)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givegunall [type] [number]");
                    SendClientMessage(playerid, COLOR_GRAD1, "1: MP5");
                    SendClientMessage(playerid, COLOR_GRAD1, "2: AK47");
                    SendClientMessage(playerid, COLOR_GRAD2, "3: M4");
                    return 1;
                }
                new number = strvalEx(tmp);
                if(number == 1) { GivePlayerWeaponAll(29, 999999); }
                else if(number == 2) { GivePlayerWeaponAll(30, 999999); }
                else if(number == 3) { GivePlayerWeaponAll(31, 999999); }
                else { return 0; }
            }
            if(type == 7)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givegunall [type] [number]");
                    SendClientMessage(playerid, COLOR_GRAD1, "1: Rocket Launcher");
                    SendClientMessage(playerid, COLOR_GRAD1, "2: HS Rocket Launcher");
                    SendClientMessage(playerid, COLOR_GRAD2, "3: Flamethrower");
                    SendClientMessage(playerid, COLOR_GRAD2, "4: Minigun");
                    return 1;
                }
                new number = strvalEx(tmp);
                if(number == 1) { GivePlayerWeaponAll(35, 999999); }
                else if(number == 2) { GivePlayerWeaponAll(36, 999999); }
                else if(number == 3) { GivePlayerWeaponAll(37, 999999); }
                else if(number == 4) { GivePlayerWeaponAll(38, 999999); }
                else { return 0; }
            }
            if(type == 8)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givegunall [type] [number]");
                    SendClientMessage(playerid, COLOR_GRAD1, "1: Molotovs");
                    SendClientMessage(playerid, COLOR_GRAD1, "2: Grenades");
                    SendClientMessage(playerid, COLOR_GRAD2, "3: Tear Gas");
                    return 1;
                }
                new number = strvalEx(tmp);
                if(number == 1) { GivePlayerWeaponAll(18, 999999); }
                else if(number == 2) { GivePlayerWeaponAll(16, 999999); }
                else if(number == 3) { GivePlayerWeaponAll(17, 999999); }
                else { return 0; }
            }
            if(type == 9)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givegunall [type] [number]");
                    SendClientMessage(playerid, COLOR_GRAD1, "1: Spraycan");
                    SendClientMessage(playerid, COLOR_GRAD2, "2: Fire Extinguisher");
                    SendClientMessage(playerid, COLOR_GRAD2, "3: Nightvision");
                    SendClientMessage(playerid, COLOR_GRAD3, "4: Infrared");
                    SendClientMessage(playerid, COLOR_GRAD3, "5: Flowers");
                    SendClientMessage(playerid, COLOR_GRAD4, "6: Brass Knuckles");
                    SendClientMessage(playerid, COLOR_GRAD4, "7: Parachute");
                    return 1;
                }
                new number = strvalEx(tmp);
                if(number == 1) { GivePlayerWeaponAll(41, 999999); }
                else if(number == 2) { GivePlayerWeaponAll(42, 999999); }
                else if(number == 3) { GivePlayerWeaponAll(44, 999999); }
                else if(number == 4) { GivePlayerWeaponAll(45, 999999); }
                else if(number == 5) { GivePlayerWeaponAll(14, 999999); }
                else if(number == 6) { GivePlayerWeaponAll(1, 999999); }
                else if(number == 7) { GivePlayerWeaponAll(46, 999999); }
                else { return 0; }
            }
            if(type == 10)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givegunall [type] [number]");
                    SendClientMessage(playerid, COLOR_GRAD1, "1: Purple Dildo");
                    SendClientMessage(playerid, COLOR_GRAD1, "2: Small White Vibrator");
                    SendClientMessage(playerid, COLOR_GRAD2, "3: Large White Vibrator");
                    SendClientMessage(playerid, COLOR_GRAD2, "4: Silver Vibrator");
                    SendClientMessage(playerid, COLOR_GRAD3, "5: Satchel Charge");
                    SendClientMessage(playerid, COLOR_GRAD3, "6: Detonator");
                    SendClientMessage(playerid, COLOR_GRAD4, "7: Fake Pistol");
                    return 1;
                }
                new number = strvalEx(tmp);
                if(number == 1) { GivePlayerWeaponAll(10, 999999); }
                else if(number == 2) { GivePlayerWeaponAll(11, 999999); }
                else if(number == 3) { GivePlayerWeaponAll(12, 999999); }
                else if(number == 4) { GivePlayerWeaponAll(13, 999999); }
                else if(number == 5) { GivePlayerWeaponAll(39, 999999); }
                else if(number == 6) { GivePlayerWeaponAll(40, 999999); }
                else if(number == 7) { GivePlayerWeaponAll(47, 999999); }
                else { return 0; }
            }
        }
        return 1;
    }
Pleases any help?
Reply
#2

Get the functions GivePlayerWeaponAll and GivePlayerAdminGun and delete the multiple of the variable idcar.
Reply
#3

How to get the functions?
Reply
#4

pawn Code:
forward GivePlayerWeaponAll(weaponid,ammo);
public GivePlayerWeaponAll(weaponid,ammo)
{
    ////foreach(Player, i)
    for(new i; i<MAX_PLAYERS; i++)

    {
        if(IsPlayerConnected(i))

        {
            GivePlayerAdminGun(i, weaponid);

        }

    }
}

stock GivePlayerAdminGun(playerid, weaponid)
{
    switch (weaponid)

    {
        case 1:
        {
            aGun[playerid][0] = 1; GivePlayerWeapon(playerid, 1, 1);
        }
        case 2..9:
        {
            aGun[playerid][1] = weaponid; GivePlayerWeapon(playerid, weaponid, 1);
        }
        case 10..15:
        {
            aGun[playerid][10] = weaponid; GivePlayerWeapon(playerid, weaponid, 1);
        }
        case 16..18, 39:
        {
            aGun[playerid][8] = weaponid; GivePlayerWeapon(playerid, weaponid, 2);
        }
        case 21:
        {
            aGun[playerid][12] = 21; SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
        }
        case 22..24:
        {
            aGun[playerid][2] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 25..27:
        {
            aGun[playerid][3] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 28..29, 32:
        {
            aGun[playerid][4] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 30, 31:
        {
            aGun[playerid][5] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 33, 34:
        {
            aGun[playerid][6] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 35..38:
        {
            aGun[playerid][7] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 40:
        {
            aGun[playerid][12] = 40; GivePlayerWeapon(playerid, 40, 1);
        }
        case 41..43:
        {
            aGun[playerid][9] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 44..46:
        {
            aGun[playerid][11] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }

    }
    return 1;
}
Reply
#5

Where i add this[HIC]Killer can you open up MSN messenger help me with this??PLease?
I already added you.
Reply
#6

I added it and i got 5 errrors
Code:
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(1023) : error 010: invalid function or declaration
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(1029) : error 017: undefined symbol "aGun"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(1029) : warning 215: expression has no effect
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(1029) : error 001: expected token: ";", but found "]"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(1029) : error 029: invalid expression, assumed zero
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(1029) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
pawn Code:
return 1;
}
stock GivePlayerAdminGun(playerid, weaponid)
{
    switch (weaponid)
    {
        case 1: { aGun[playerid][0] = 1; GivePlayerWeapon(playerid, 1, 1); }
        case 2..9: { aGun[playerid][1] = weaponid; GivePlayerWeapon(playerid, weaponid, 1); }
        case 10..15: { aGun[playerid][10] = weaponid; GivePlayerWeapon(playerid, weaponid, 1); }
        case 16..18, 39: { aGun[playerid][8] = weaponid; GivePlayerWeapon(playerid, weaponid, 2); }
        case 21: { aGun[playerid][12] = 21; SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK); }
        case 22..24: { aGun[playerid][2] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999); }
        case 25..27: { aGun[playerid][3] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999); }
        case 28..29, 32: { aGun[playerid][4] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999); }
        case 30, 31: { aGun[playerid][5] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999); }
        case 33, 34: { aGun[playerid][6] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999); }
        case 35..38: { aGun[playerid][7] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999); }
        case 40: { aGun[playerid][12] = 40; GivePlayerWeapon(playerid, 40, 1); }
        case 41..43: { aGun[playerid][9] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999); }
        case 44..46: { aGun[playerid][11] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999); }
    }
    return 1;
}
Line
1023-1045
Reply
#7

Quote:
Originally Posted by Kingunit
View Post
pawn Code:
stock GivePlayerAdminGun(playerid, weaponid)
{
    switch (weaponid)

    {
        case 1:
        {
            aGun[playerid][0] = 1; GivePlayerWeapon(playerid, 1, 1);
        }
        case 2..9:
        {
            aGun[playerid][1] = weaponid; GivePlayerWeapon(playerid, weaponid, 1);
        }
        case 10..15:
        {
            aGun[playerid][10] = weaponid; GivePlayerWeapon(playerid, weaponid, 1);
        }
        case 16..18, 39:
        {
            aGun[playerid][8] = weaponid; GivePlayerWeapon(playerid, weaponid, 2);
        }
        case 21:
        {
            aGun[playerid][12] = 21; SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
        }
        case 22..24:
        {
            aGun[playerid][2] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 25..27:
        {
            aGun[playerid][3] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 28..29, 32:
        {
            aGun[playerid][4] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 30, 31:
        {
            aGun[playerid][5] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 33, 34:
        {
            aGun[playerid][6] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 35..38:
        {
            aGun[playerid][7] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 40:
        {
            aGun[playerid][12] = 40; GivePlayerWeapon(playerid, 40, 1);
        }
        case 41..43:
        {
            aGun[playerid][9] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }
        case 44..46:
        {
            aGun[playerid][11] = weaponid; GivePlayerWeapon(playerid, weaponid, 99999);
        }

    }
    return 1;
}
Why not using
pawn Code:
stock GetWeaponSlot(weaponid)
{
    new slot;
    switch(weaponid)
    {
        case 0,1: slot = 0;
        case 2..9: slot = 1;
        case 22..24: slot = 2;
        case 25..27: slot = 3;
        case 28,29,32: slot = 4;
        case 30,31: slot = 5;
        case 33,34: slot = 6;
        case 35..38: slot = 7;
        case 16..18,39: slot = 8;
        case 41..43: slot = 9;
        case 10..15: slot = 10;
        case 44..46: slot = 11;
        case 40: slot = 12;
        default: slot = -1;
    }
    return slot;
}
Then in your extended stock
(example)
pawn Code:
//...
aGun[playerid][GetWeaponSlot(weaponid)] = weaponid;
GivePlayerWeapon(playerid, weaponid, ammo);
//...
Reply
#8

pawn Code:
case 1:
        {
            aGun[playerid][0]= 1; GivePlayerWeapon(playerid, 1, 1);
        }
This got errors\

Code:
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(985) : error 017: undefined symbol "aGun"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(985) : warning 215: expression has no effect
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(985) : error 001: expected token: ";", but found "]"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(985) : error 029: invalid expression, assumed zero
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(985) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#9

er??s
Reply
#10

Arnold My Brother! Thats why i was telling you to Use an Original Game Mode! You Will keep getting bugs. Sometime's big and sometime's small! You should be able to Debug half of them. Im sick! I have lot of fever. So im not able to fix your errors in your GM.Hope will do it soon!
Reply
#11

Im using Ravens RP?Not that all script
Reply
#12

do not use Ravens RP [The Edit Version] use the original version of Ravens RP its available in Gamemode Section
don't download the GM from GTA Roleplay download the original one with tag [2.5b]
Reply
#13

Ya im using it..but i need to add some commands for admin features thats why i got those errors
Code:
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(985) : error 017: undefined symbol "aGun"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(985) : warning 215: expression has no effect
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(985) : error 001: expected token: ";", but found "]"
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(985) : error 029: invalid expression, assumed zero
C:\Users\AztecasGamerzzz\Desktop\GOod Servers\TRRP v1.0\gamemodes\trrp.pwn(985) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
btw you got a server??Nedd admins?im good
Reply
#14

i have a server but you need a hamachi to go there pm if you want to be admin first get a hamachi
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)