Szerző Téma: fegyver dialog,interior segítségkérés!  (Megtekintve 1003 alkalommal)

fegyver dialog,interior segítségkérés!
« Dátum: 2013. január 04. - 19:45:26 »
0 Show voters
Sziasztok.
Ebben a témában szeretnék feltenni kérdéseket, amihez sajnos nem nagyon értek, de már tanulom..
1. Vannak pl. benzinkutak, amikbe singleplayerbe nem lehet bemenni. Hogy tudom azt megcsinálni, hogy betudjak menni, valamint hogy egy interiorba dobjon, amit én választok ki?
3. Ha pl. fegyvert akarok venni, akkor /fegyver parancsra bejöjjön egy ilyen ablak szerûség (valami dialog) és ott lennének választások, (nehéz fegyver,pisztoly,stb) és ott mindegyik kb. 500 $-ba kerülne, akkor azt az 500 $ levonná a pénzembõl. Ezt hogy kell? (dialog szerûséget)
4. Ha van nálam pl. AK47, akkor azt elraknám és a hátamon lenne. Hallottam, hogy valamit kell csinálni azért, hogy a hátamra rakta, miután elrakom. egyszóval azt akarom, hogy a hátamon legyen a fegyver.
 A válaszokat nagyon megköszönnén :)
« Utoljára szerkesztve: 2013. január 12. - 21:08:33 írta Crobal »

Nem elérhető shadee

  • 1073
    • Profil megtekintése
fegyver dialog,interior segítségkérés!
« Válasz #1 Dátum: 2013. január 08. - 12:25:11 »
0 Show voters
1.
 
CMD:enter(playerid)
{
      if(IsPlayerInRangeOfPoint(playerid, sugar, x, y, z))//sugár = távolság, x, y, z helyére a belépési pontot
{
    SetPlayerPos(playerid, X, Y, Z);//X, Y, Z helyére a teleportálási Poziciót
    SetPlayerInterior(playerid, INT);//INT helyére az interior ID-t
}
return 1;
}

 
2.módba beírod.
3.
 
CMD:fegyver(playerid)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,\"\",\"Deagle\\nMp5\",\"megveszem\",\"Mégse\");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
    if(response)
    {
        if(listitem == 0)
        {
            //Deagle
   }
   else if(listitem == 1)
   {
       //mp5
   }
}
}
return 1;
}

 
4.neten van.

Nem elérhető Rupert

  • 2301
    • Profil megtekintése
fegyver dialog,interior segítségkérés!
« Válasz #2 Dátum: 2013. január 08. - 12:32:37 »
0 Show voters
[mod]A téma neve magára a kérdés(ek)re utaljon! [/mod]

fegyver dialog,interior segítségkérés!
« Válasz #3 Dátum: 2013. január 12. - 21:13:17 »
0 Show voters
shadee, köszönöm a segítségedet! Õõõ, a fegyver a hátadon -t hol találom a neten? Nem találtam sehol sem. Esetleg valami linket tudnál dobni?
Köszi.

Nem elérhető Szasza

  • 388
    • Profil megtekintése
fegyver dialog,interior segítségkérés!
« Válasz #4 Dátum: 2013. január 27. - 22:00:34 »
0 Show voters
#include <a_samp>
#define ARMEDBODY_USE_HEAVY_WEAPON          (false)
static
    armedbody_pTick[MAX_PLAYERS];
public OnFilterScriptInit(){
    printf(\"=====================================================================\");
    printf(\"This is a part of a OpenGTA subject, visit opengta.org for more info.\");
    printf(\"FilterScript Name: Armed body\");
    printf(\"Description:Attatch weapond to player\'s body\");
    printf(\"Author:yezizhu\");
    printf(\"Special thanks:Double-O-Seven, Brian.\");
    printf(\"Contact author: [email protected]\");
    printf(\"=====================================================================\");
    return true;
}
public OnFilterScriptExit(){
    return true;
}
public OnPlayerUpdate(playerid){
    if(GetTickCount() - armedbody_pTick[playerid] > 113){ //prefix check itter
        new
            weaponid[13],weaponammo[13],pArmedWeapon;
        pArmedWeapon = GetPlayerWeapon(playerid);
        GetPlayerWeaponData(playerid,1,weaponid[1],weaponammo[1]);
        GetPlayerWeaponData(playerid,2,weaponid[2],weaponammo[2]);
        GetPlayerWeaponData(playerid,4,weaponid[4],weaponammo[4]);
        GetPlayerWeaponData(playerid,5,weaponid[5],weaponammo[5]);
        #if ARMEDBODY_USE_HEAVY_WEAPON
        GetPlayerWeaponData(playerid,7,weaponid[7],weaponammo[7]);
        #endif
        if(weaponid[1] && weaponammo[1] > 0){
            if(pArmedWeapon != weaponid[1]){
                if(!IsPlayerAttachedObjectSlotUsed(playerid,0)){
                    SetPlayerAttachedObject(playerid,0,GetWeaponModel(weaponid[1]),1, 0.199999, -0.139999, 0.030000, 0.500007, -115.000000, 0.000000, 1.000000, 1.000000, 1.000000);
                }
            }
            else {
                if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
                    RemovePlayerAttachedObject(playerid,0);
                }
            }
        }
        else if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
            RemovePlayerAttachedObject(playerid,0);
        }
        if(weaponid[2] && weaponammo[2] > 0){
            if(pArmedWeapon != weaponid[2]){
                if(!IsPlayerAttachedObjectSlotUsed(playerid,1)){
                    SetPlayerAttachedObject(playerid,1,GetWeaponModel(weaponid[2]),8, -0.079999, -0.039999, 0.109999, -90.100006, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
                }
            }
            else {
                if(IsPlayerAttachedObjectSlotUsed(playerid,1)){
                    RemovePlayerAttachedObject(playerid,1);
                }
            }
        }
        else if(IsPlayerAttachedObjectSlotUsed(playerid,1)){
            RemovePlayerAttachedObject(playerid,1);
        }
        if(weaponid[4] && weaponammo[4] > 0){
            if(pArmedWeapon != weaponid[4]){
                if(!IsPlayerAttachedObjectSlotUsed(playerid,2)){
                    SetPlayerAttachedObject(playerid,2,GetWeaponModel(weaponid[4]),7, 0.000000, -0.100000, -0.080000, -95.000000, -10.000000, 0.000000, 1.000000, 1.000000, 1.000000);
                }
            }
            else {
                if(IsPlayerAttachedObjectSlotUsed(playerid,2)){
                    RemovePlayerAttachedObject(playerid,2);
                }
            }
        }
        else if(IsPlayerAttachedObjectSlotUsed(playerid,2)){
            RemovePlayerAttachedObject(playerid,2);
        }
        if(weaponid[5] && weaponammo[5] > 0){
            if(pArmedWeapon != weaponid[5]){
                if(!IsPlayerAttachedObjectSlotUsed(playerid,3)){
                    SetPlayerAttachedObject(playerid,3,GetWeaponModel(weaponid[5]),1, 0.200000, -0.119999, -0.059999, 0.000000, 206.000000, 0.000000, 1.000000, 1.000000, 1.000000);
                }
            }
            else {
                if(IsPlayerAttachedObjectSlotUsed(playerid,3)){
                    RemovePlayerAttachedObject(playerid,3);
                }
            }
        }
        else if(IsPlayerAttachedObjectSlotUsed(playerid,3)){
            RemovePlayerAttachedObject(playerid,3);
        }
        #if ARMEDBODY_USE_HEAVY_WEAPON
        if(weaponid[7] && weaponammo[7] > 0){
            if(pArmedWeapon != weaponid[7]){
                if(!IsPlayerAttachedObjectSlotUsed(playerid,4)){
                    SetPlayerAttachedObject(playerid,4,GetWeaponModel(weaponid[7]),1,-0.100000, 0.000000, -0.100000, 84.399932, 112.000000, 10.000000, 1.099999, 1.000000, 1.000000);
                }
            }
            else {
                if(IsPlayerAttachedObjectSlotUsed(playerid,4)){
                    RemovePlayerAttachedObject(playerid,4);
                }
            }
        }
        else if(IsPlayerAttachedObjectSlotUsed(playerid,4)){
            RemovePlayerAttachedObject(playerid,4);
        }
        #endif
        armedbody_pTick[playerid] = GetTickCount();
    }
    return true;
}
   
   
//by Double-O-Seven
stock GetWeaponModel(weaponid)
{
    switch(weaponid)
    {
        case 1:
            return 331;
        case 2..8:
            return weaponid+331;
        case 9:
            return 341;
        case 10..15:
            return weaponid+311;
        case 16..18:
            return weaponid+326;
        case 22..29:
            return weaponid+324;
        case 30,31:
            return weaponid+325;
        case 32:
            return 372;
        case 33..45:
            return weaponid+324;
        case 46:
            return 371;
    }
    return 0;
}

 
Sramm írta egyik hozzászólásba hasonló témánál
Ja és volt vele dolgom régen... mûködik csak azt hiszem shotgunt és snipert /abba a lotba lévõket nem mutatja...
Nincsmit

fegyver dialog,interior segítségkérés!
« Válasz #5 Dátum: 2013. február 04. - 14:32:02 »
0 Show voters
Köszönöm! :)
[mod]
Megkérnék minden kedves témanyitót\' date=\' ha kérdésére/kérésére választ kapott, akkor legyen szíves használni, a \"Téma megoldva\" funkciót![/quote\'][/mod][/quote]
« Utoljára szerkesztve: 2013. március 03. - 10:02:59 írta Benceee »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal