Quantcast
Channel: Forum VeryGames
Viewing all articles
Browse latest Browse all 5196

[aide] Ajout DV | Peitit code | BALLE AUX PRISONNIERS

$
0
0
Bonjour,
Je suis en train de modifier un plugin de DV partagé ( Delachambre )

J'ai ajouté la DV "Balle aux prisonniers"

Voilà mon code :

Code:

ChooseBalle(client){
    if(client > 0 && client <= MaxClients && !IsFakeClient(client))
    {
        decl String:sMenuText[64];
        sMenuText[0] = '\0';
       
        new Handle:menu = CreateMenu(Menu_balle);
        SetMenuTitle(menu, "Choisi un gardien :");
        SetMenuExitButton(menu, true);
       
        balle(menu);
       
        DisplayMenu(menu, client, MENU_TIME_FOREVER);
    }
}


public balle(Handle:menu)
{
    decl String:user_id[12];
    decl String:name[MAX_NAME_LENGTH];
    decl String:display[MAX_NAME_LENGTH+15];
   
    for (new i = 1; i <= MaxClients; i++)
    {
        if (IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 3)
        {
            IntToString(GetClientUserId(i), user_id, sizeof(user_id));
               
            GetClientName(i, name, sizeof(name));
               
            Format(display, sizeof(display), "%s", name);
               
            AddMenuItem(menu, user_id, display);
        }
    }
}


public Menu_balle(Handle:menu, MenuAction:action, client, param2)
{
    if (action == MenuAction_Select)
    {
        new String:info[64];
       
        GetMenuItem(menu, param2, info, sizeof(info));
       
        new UserID = StringToInt(info);
        m[client] = GetClientOfUserId(UserID);
       
        TeleportEntity(client, Float:{ -1405.188599, 1085.225586, 129.031311 }, NULL_VECTOR, NULL_VECTOR);
        TeleportEntity(m[client], Float:{ -1128.996338, 1447.721558, 129.031311 }, NULL_VECTOR, NULL_VECTOR);
       
        disarm(client);
        disarm(m[client]);
       
            new flash1 = CreateEntityByName("weapon_flashbang");
            new flash2 = CreateEntityByName("weapon_flashbang");
            DispatchSpawn(flash1);
            DispatchSpawn(flash2);
            EquipPlayerWeapon(client, flash1);
            EquipPlayerWeapon(m[client], flash2);


        DvEnCours[client] = true;
       
        SetEntityHealth(client, 1);
        SetEntityHealth(m[client], 1);
        SetEntityRenderColor(client, 255, 64, 64,0);
        SetEntityRenderColor(m[client], 0, 0, 205, 0);
    }
    else if (action == MenuAction_End)
    {
        CloseHandle(menu);
    }
}

Le problème c'est que :

Le flashbang fonctionne ( quand on lance la flash on est "flashé" )

Lorsque on lance la flash, une autre ne vient pas automatiquement !

Quelqu'un à une solution s'il vous plait !

Cordialement

Viewing all articles
Browse latest Browse all 5196

Trending Articles


Girasoles para colorear


mayabang Quotes, Torpe Quotes, tanga Quotes


Tagalog Quotes About Crush – Tagalog Love Quotes


OFW quotes : Pinoy Tagalog Quotes


Long Distance Relationship Tagalog Love Quotes


Tagalog Quotes To Move on and More Love Love Love Quotes


5 Tagalog Relationship Rules


Best Crush Tagalog Quotes And Sayings 2017


Re:Mutton Pies (lleechef)


FORECLOSURE OF REAL ESTATE MORTGAGE


Sapos para colorear


tagalog love Quotes – Tiwala Quotes


Break up Quotes Tagalog Love Quote – Broken Hearted Quotes Tagalog


Patama Quotes : Tagalog Inspirational Quotes


Pamatay na Banat and Mga Patama Love Quotes


Tagalog Long Distance Relationship Love Quotes


BARKADA TAGALOG QUOTES


“BAHAY KUBO HUGOT”


Vimeo 10.7.0 by Vimeo.com, Inc.


Vimeo 10.7.1 by Vimeo.com, Inc.