[Cerere Plugin] Echipa rosu & albastru

In acest subforum puteţi cere un plugin pentru server .
Post Reply
User avatar
Rusu Radu
Detinator Server
Detinator Server
Posts: 1961
Joined: 6 years ago
Location: Dozer
Has thanked: 16 times
Been thanked: 2 times
Zodiac:
Age: 22
Contact:
Status: Offline
Jamaica

1 month ago

Un plugin care face ca Terrorisi sa fie rosi si Counter-Terroristi sa fie albastri.

Am incercat prin pluginul de new_weapons dar nu merge sa schimb :44:

Am primit acest sma de la cineva.

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

enum _:INFORM
{
    szPath[64],
    szName[64]
}

enum
{
    CTM = 0,
    TM = 1
}

new const MODELS[][INFORM] = 
{
    {"models/player/bluect/bluect.mdl", "bluect"},
    {"models/player/bluet/bluet.mdl", "bluet"}
}

public plugin_init()
{
    register_plugin("Player Models", "1.0", "lexzor");

    RegisterHam(Ham_Spawn, "player", "fwPlayerSpawn");
}

public plugin_precache()
{
    if(file_exists(MODELS[CTM]) && file_exists(MODELS[TM]))
    {
        precache_model(MODELS[CTM][szPath]);
        precache_model(MODELS[TM][szPath]);
    } else set_fail_state("Wrong player model path");
}

public fwPlayerSpawn(id)
{
    if(is_user_alive(id))
    {
        switch(cs_get_user_team(id))
        {
            case CS_TEAM_CT: cs_set_user_model(id, MODELS[CTM][szName]);
            case CS_TEAM_T: cs_set_user_model(id, MODELS[TM][szName]);
            default: cs_reset_user_model(id);
        }
    }
}
Viaţa însăşi este magie, iar dacă nu crezi asta, măcar încearcă să o trăieşti ca pe ceva magic.
Image

©Rusu Radu

2022 CSGAMERS IS HERE
User avatar
Aneimar
Fondator
Fondator
Posts: 1899
Joined: 7 years ago
Location: RO - DE
Has thanked: 0
Been thanked: 9 times
Zodiac:
Age: 26
Contact:
Status: Offline
Romania

1 month ago

Plugin:

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

public plugin_init() {
RegisterHam(Ham_Spawn, "player", "ham_player_spawn", 1)
}

public plugin_precache() {
precache_model("models/player/tero/tero.mdl")
precache_model("models/player/ct/ct.mdl")
}

public ham_player_spawn(id) {
if (cs_get_user_team(id) == CS_TEAM_T) 
{
cs_set_user_model(id, "tero")			
}
else if (cs_get_user_team(id) == CS_TEAM_CT) 
{
cs_set_user_model(id, "ct")			
}
else 
{
cs_reset_user_model(id)
}
}
Model jucator CT/Tero: [Please login or register to view this link]
These users thanked the author Aneimar for the post:
Rusu Radu (1 month ago)
Rating: 33.33%
Image


|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯•.•¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
Image
|___________________________.•.___________________________|

|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯•.•¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
Image
|___________________________.•.___________________________|

|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯•.•¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
Image
|___________________________.•.___________________________|
Post Reply

Return to “Cerere Plugin”