Szerző Téma: Equip  (Megtekintve 1244 alkalommal)

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Equip
« Dátum: 2012. január 07. - 22:40:29 »
0 Show voters
Készitõ : OKStyle
http://forum.sa-mp.com/showthread.php?t=220112
[pawn]/*
*   Created:    02.02.11
*   Author:     OKStyle
*   Description:    Armour 2.3
*/
#include <a_samp>
#define COLOR_INTERFACE_BODY 0xFDE39DAA
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, \"/equip\", true, 6) == 0)
    {
        if(GetPVarInt(playerid, \"Equipped\") != 0) return SendClientMessage(playerid, COLOR_INTERFACE_BODY, \"Már felvagy öltözve!\");
        if(GetPlayerSkin(playerid) < 280 || GetPlayerSkin(playerid) > 288) return SendClientMessage(playerid, COLOR_INTERFACE_BODY, \"Csak Rendör SKINEKEN!!.\");
        SetPlayerAttachedObject(playerid, 1, 19142,  1, 0.1,  0.05, 0.0,  0.0,   0.0,   0.0);
        SetPlayerAttachedObject(playerid, 2, 19141,  2, 0.11, 0.0,  0.0,  0.0,   0.0,   0.0);
        SetPlayerAttachedObject(playerid, 3, 18637, 13, 0.35, 0.0,  0.0,  0.0,   0.0, 180.0);
        SetPlayerAttachedObject(playerid, 4, 18642,  7, 0.1,  0.0, -0.11, 0.0, -90.0,  90.0);
        GivePlayerWeapon(playerid, 3, 1);
        SetPlayerArmour(playerid, 100.0);
        SetPVarInt(playerid, \"Equipped\", 1);
        return 1;
    }
    if(strcmp(cmdtext, \"/equipoff\", true, 9) == 0)
    {
        if(GetPVarInt(playerid, \"Equipped\") != 1) return SendClientMessage(playerid, COLOR_INTERFACE_BODY, \"Leleszel vetköztetve!\");
        new Float:ap;
        GetPlayerArmour(playerid, ap);
        if(ap > 0)
        {
            RemovePlayerAttachedObject(playerid, 1);
            SetPlayerArmour(playerid, 0.0);
        }
        RemovePlayerAttachedObject(playerid, 2);
        RemovePlayerAttachedObject(playerid, 3);
        RemovePlayerAttachedObject(playerid, 4);
        new weapons[13][2];
        for (new i; i < 13; i++)
        {
            GetPlayerWeaponData(playerid, i, weapons
  • , weapons[1]);


        }


        ResetPlayerWeapons(playerid);


        for (new i; i < 13; i++)


        {


            if(i == 1) continue;


            GivePlayerWeapon(playerid, weapons[0], weapons[1]);


        }


        SetPVarInt(playerid, \"Equipped\", 0);


        SendClientMessage(playerid, COLOR_INTERFACE_BODY, \"Lelettél vetköztetve és fegyvertelenitve.\");


        return 1;


    }


    return 0;


}


public OnPlayerUpdate(playerid)


{


    if(GetPVarInt(playerid, \"Equipped\") == 1)


    {


        RemovePlayerAttachedObject(playerid, 1);


        new Float:ap;


        GetPlayerArmour(playerid, ap);


        if(ap > 0) SetPlayerAttachedObject(playerid, 1, 19142,  1, 0.1,  0.05, 0.0,  0.0,   0.0,   0.0);


    }


    return 1;


}


public OnFilterScriptExit()


{


    for(new i, j = GetMaxPlayers(); i != j; i++)


    {


        if(!IsPlayerConnected(i)) continue;


        if(IsPlayerNPC(i)) continue;


        if(GetPVarInt(playerid, \"Equipped\") != 1) continue;


        RemovePlayerAttachedObject(i, 1);


        RemovePlayerAttachedObject(i, 2);


        RemovePlayerAttachedObject(i, 3);


        RemovePlayerAttachedObject(i, 4);


    }


    return 1;


}
[/pawn]
« Utoljára szerkesztve: 2012. január 07. - 22:48:35 írta ZzzzzZ »

Nem elérhető Mike.

  • 720
    • Profil megtekintése
Equip
« Válasz #1 Dátum: 2012. január 07. - 22:47:15 »
0 Show voters
Tetszik.  8)

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Equip
« Válasz #2 Dátum: 2012. január 07. - 22:48:08 »
0 Show voters
Kösz :D

Equip
« Válasz #3 Dátum: 2012. január 08. - 08:38:01 »
0 Show voters
17 error

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Equip
« Válasz #4 Dátum: 2012. január 08. - 10:07:52 »
0 Show voters
ird le mi az errorok

Nem elérhető The

  • 4384
    • Profil megtekintése
Equip
« Válasz #5 Dátum: 2012. január 08. - 11:07:39 »
0 Show voters
Nem rossz de leírhattad volna, hogy miez. Nem csak annyit, hogy készítõ eredeti téma link + kód és ennyi.

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Equip
« Válasz #6 Dátum: 2012. január 08. - 16:54:11 »
0 Show voters
Idézetet írta: DW date=1326017259\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"15361\" data-ipsquote-contentclass=\"forums_Topic
Nem rossz de leírhattad volna, hogy miez. Nem csak annyit, hogy készítõ eredeti téma link + kód és ennyi.
 
mit irjak rola ember ?? ez nem elég ? képeket nem tudtam áthozni :S

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal