I desperately need help big time please
#3

Quote:
Originally Posted by milanosie
Посмотреть сообщение
Edit this: This is a straight copy from one of my earlyer versions, before mysql:


pawn Код:
CMD:tinfo(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))
            {
            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!");
            new wepname1[24], wepname2[24], wepname3[24];
            new name[24];
            GetPlayerName(playerid, name, 24);
            new str[128], str2[128], str3[128], str4[128];
            GetWeaponName(trunk[v][vwep1], wepname1, 24);
            GetWeaponName(trunk[v][vwep2], wepname2, 24);
            GetWeaponName(trunk[v][vwep3], wepname3, 24);
            format(str, sizeof(str), "Slot 1: %s Ammo: %d", wepname1, trunk[v][vwep1a]);
            format(str2, sizeof(str2), "Slot 2: %s Ammo: %d", wepname2, trunk[v][vwep2a]);
            format(str3, sizeof(str3), "Slot 3: %s Ammo: %d", wepname3, trunk[v][vwep3a]);
            format(str4, sizeof(str4), "*%s opens the trunk to check what's inside", name);
            SendClientMessage(playerid, COLOR_ORANGE, "||===========|| TRUNK ||===========||");
            SendClientMessage(playerid, COLOR_GREENISHGOLD, str);
            SendClientMessage(playerid, COLOR_GREENISHGOLD, str2);
            SendClientMessage(playerid, COLOR_GREENISHGOLD, str3);
            LocalChat(25.0, playerid, str4, 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)
    {
        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))
            {
            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!");
            new wepname1[24], wepname2[24];
            new name[24];
            GetPlayerName(playerid, name, 24);
            new str[128], str2[128], str4[128];
            GetWeaponName(ptrunk1[v], wepname1, 24);
            GetWeaponName(ptrunk2[v], wepname2, 24);
            format(str, sizeof(str), "Slot 1: %s Ammo: %d", wepname1, ptrunk1a[v]);
            format(str2, sizeof(str2), "Slot 2: %s Ammo: %d", wepname2, ptrunk2a[v]);
            format(str4, sizeof(str4), "*%s opens the trunk to check what's inside", name);
            SendClientMessage(playerid, COLOR_ORANGE, "||===========|| TRUNK ||===========||");
            SendClientMessage(playerid, COLOR_GREENISHGOLD, str);
            SendClientMessage(playerid, COLOR_GREENISHGOLD, str2);
            LocalChat(25.0, playerid, str4, 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, "Not near any vehicles!");
    }
    return 1;
}
I need it the same as my enums and if its in any of my owned cars please help im so angry i cant do it
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)