I desperately need help big time please
#5

Quote:
Originally Posted by milanosie
Посмотреть сообщение
How hard can it be to change enums?

wait, let me give you my /trunk store gun.


pawn Код:
CMD:tputgun(playerid, params[])
{
    new count = 0;
    new count2 = 0;
    for(new i = Index[topnumber]; i < MAX_VEHICLES; i++)
    {
        new Float:ppx, Float:ppy, Float:ppz;
        GetVehiclePos(i, ppx, ppy, ppz);
        if(IsPlayerInRangeOfPoint(playerid, 3.5, ppx, ppy, ppz))
        {
            count2++;
        }
    }
    for(new v = 1; v < Index[topnumber]; v++)
    {
        new Float:vpx, Float:vpy, Float:vpz;
        GetVehiclePos(v, vpx, vpy, vpz);
        if(IsPlayerInRangeOfPoint(playerid, 3.5, vpx, vpy, vpz))
        {
            count++;
        }
    }
    if(count > 0)
    {
    for(new v = 1; v < Index[topnumber]; v++)
    {
        new Float:vpx, Float:vpy, Float:vpz;
        GetVehiclePos(v, vpx, vpy, vpz);
        if(IsPlayerInRangeOfPoint(playerid, 3.5, vpx, vpy, vpz))
        {
            new bullets;
            if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_GREY, "You can't do this when your inside the car!");
            if(vehilocked[v] == 1) return SendClientMessage(playerid, COLOR_RED, "This vehicle is locked!");
            if(sscanf(params, "i", bullets)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /tputgun [Ammo]");
            new str[128];
            new name[24];
            GetPlayerName(playerid, name, 24);
            new ammo = GetPlayerAmmo(playerid);
            new weapon = GetPlayerWeapon(playerid);
            if(trunk[v][vwep1] == weapon || trunk[v][vwep1a] == 0)
            {
            new wepn[24];
            GetWeaponName(weapon, wepn, 24);
            if(sscanf(params, "i", bullets)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /tputgun [Ammo]");
            if(bullets > ammo) return SendClientMessage(playerid, COLOR_GREY, "You do not have that much ammo!");
            if(bullets + trunk[v][vwep1a] > 7500) return SendClientMessage(playerid, COLOR_GREY, "Trunk can not have more then 7500 ammo on one slot!");
            if(bullets < 1 ) return SendClientMessage(playerid, COLOR_GREY, "Negative Ammo is not possible! Use /ttakegun instead");
            trunk[v][vwep1] = weapon;
            trunk[v][vwep1a] = trunk[v][vwep1a] + bullets;
            GivePlayerWeapon(playerid, weapon, -bullets);
            format(str, sizeof(str), "%s places their %s into the trunk", name, wepn);
            LocalChat(15.0, playerid, str, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
            GetVehicleParamsEx(v,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(v,engine,lights,alarm,doors,bonnet,true,objective);
            carboot[v] = 1;
            }
            else if(trunk[v][vwep2] == weapon || trunk[v][vwep2a] == 0)
            {
            new wepn[24];
            GetWeaponName(weapon, wepn, 24);
            if(bullets > ammo) return SendClientMessage(playerid, COLOR_GREY, "You do not have that much ammo!");
            if(bullets + trunk[v][vwep2a] > 7500) return SendClientMessage(playerid, COLOR_GREY, "Trunk can not have more then 7500 ammo on one slot!");
            if(bullets < 1 ) return SendClientMessage(playerid, COLOR_GREY, "Negative Ammo is not possible! Use /ttakegun instead");
            trunk[v][vwep2] = weapon;
            trunk[v][vwep2a] = trunk[v][vwep2a] + bullets;
            GivePlayerWeapon(playerid, weapon, -bullets);
            format(str, sizeof(str), "%s places their %s into the trunk", name, wepn);
            LocalChat(15.0, playerid, str, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
            GetVehicleParamsEx(v,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(v,engine,lights,alarm,doors,bonnet,true,objective);
            carboot[v] = 1;
            }
            else if(trunk[v][vwep3] == weapon || trunk[v][vwep3a] == 0)
            {
            new wepn[24];
            GetWeaponName(weapon, wepn, 24);
            if(bullets > ammo) return SendClientMessage(playerid, COLOR_GREY, "You do not have that much ammo!");
            if(bullets + trunk[v][vwep3a] > 7500) return SendClientMessage(playerid, COLOR_GREY, "Trunk can not have more then 7500 ammo on one slot!");
            if(bullets < 1 ) return SendClientMessage(playerid, COLOR_GREY, "Negative Ammo is not possible! Use /ttakegun instead");
            trunk[v][vwep3] = weapon;
            trunk[v][vwep3a] = trunk[v][vwep3a] + bullets;
            GivePlayerWeapon(playerid, weapon, -bullets);
            format(str, sizeof(str), "%s places their %s into the trunk", name, wepn);
            LocalChat(15.0, playerid, str, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
            GetVehicleParamsEx(v,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(v,engine,lights,alarm,doors,bonnet,true,objective);
            carboot[v] = 1;
            }
            else
            {
                SCM(playerid, COLOR_GREY, "The trunk is full! Take some stuff out first!");
            }
            return 1;
        }
    }
    }
    else if(count2 > 0)
    {
    for(new v = Index[topnumber]; v < MAX_VEHICLES; v++)
    {
        new Float:vpx, Float:vpy, Float:vpz;
        GetVehiclePos(v, vpx, vpy, vpz);
        if(IsPlayerInRangeOfPoint(playerid, 3.5, vpx, vpy, vpz))
        {
            new bullets;
            if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_GREY, "You can't do this when your inside the car!");
            if(vteam[v] != 0 && vteam[v] != PlayerInfo[playerid][Fmember]) return SCM(playerid, COLOR_GREY, "You can not acces this vehicle!");
            if(sscanf(params, "i", bullets)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /tputgun [Ammo]");
            new str[128];
            new name[24];
            GetPlayerName(playerid, name, 24);
            new ammo = GetPlayerAmmo(playerid);
            new weapon = GetPlayerWeapon(playerid);
            if(ptrunk1[v] == weapon || ptrunk1a[v] == 0)
            {
            new wepn[24];
            GetWeaponName(weapon, wepn, 24);
            if(sscanf(params, "i", bullets)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /tputgun [Ammo]");
            if(bullets > ammo) return SendClientMessage(playerid, COLOR_GREY, "You do not have that much ammo!");
            if(bullets + ptrunk1a[v] > 7500) return SendClientMessage(playerid, COLOR_GREY, "Trunk can not have more then 7500 ammo on one slot!");
            if(bullets < 1 ) return SendClientMessage(playerid, COLOR_GREY, "Negative Ammo is not possible! Use /ttakegun instead");
            ptrunk1[v] = weapon;
            ptrunk1a[v] = ptrunk1a[v] + bullets;
            GivePlayerWeapon(playerid, weapon, -bullets);
            format(str, sizeof(str), "%s places their %s into the trunk", name, wepn);
            LocalChat(15.0, playerid, str, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
            GetVehicleParamsEx(v,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(v,engine,lights,alarm,doors,bonnet,true,objective);
            carboot[v] = 1;
            }
            else if(ptrunk2[v] == weapon || ptrunk2a[v] == 0)
            {
            new wepn[24];
            GetWeaponName(weapon, wepn, 24);
            if(sscanf(params, "i", bullets)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /tputgun [Ammo]");
            if(bullets > ammo) return SendClientMessage(playerid, COLOR_GREY, "You do not have that much ammo!");
            if(bullets + ptrunk2a[v] > 7500) return SendClientMessage(playerid, COLOR_GREY, "Trunk can not have more then 7500 ammo on one slot!");
            if(bullets < 1 ) return SendClientMessage(playerid, COLOR_GREY, "Negative Ammo is not possible! Use /ttakegun instead");
            ptrunk2[v] = weapon;
            ptrunk2a[v] = ptrunk2a[v] + bullets;
            GivePlayerWeapon(playerid, weapon, -bullets);
            format(str, sizeof(str), "%s places their %s into the trunk", name, wepn);
            LocalChat(15.0, playerid, str, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
            GetVehicleParamsEx(v,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(v,engine,lights,alarm,doors,bonnet,true,objective);
            carboot[v] = 1;
            }
            return 1;
            }
            }
        }
        else if(count2 == 0 && count == 0)
        {
            SCM(playerid, COLOR_GREY, "You are not near any vehicles!");
        }
        return 1;
}

I gave you everything now, your job is to pick out what you need, and leave what you don't need.
I am NOT going to make the command for you, that way you won't learn anything,
All that makes completely no sense to me please just help me
Reply


Messages In This Thread
I desperately need help big time please - by Geniuss - 03.06.2012, 20:03
Re: I desperately need help big time please - by milanosie - 03.06.2012, 20:30
Re: I desperately need help big time please - by Geniuss - 03.06.2012, 20:36
Re: I desperately need help big time please - by milanosie - 03.06.2012, 20:37
Re: I desperately need help big time please - by Geniuss - 03.06.2012, 20:42
Re: I desperately need help big time please - by Geniuss - 03.06.2012, 21:52

Forum Jump:


Users browsing this thread: 1 Guest(s)