Güncel
Konu
Şimdi normal model olacak normal takım modelleri herkes o modellere sahip olacak
Ama ct de farklı t de farklı skin yani futbol modu ya her takımın forması farklı. Yani ctmodeloyuncu.mdl tmodeloyuncu.mdl
Birde /kaleci yazınca t ise t nin kaleci skini ct ise ctnin kaleci skini olacak
Yani ctkaleci.mdl tkaleci.mdl
Bir de kalecilerin ortak 1 bıçak skini olacak iki takım içinde ortak
Kalecibicak.mdl
Toplam 5 model olacak
/Kaleci yazınca kaleci skini alacak takımına göre /oyuncu yazınca eski normal skinine geri dönecek t ise tmodeloyuncu.mdl ct ise ctmodeloyuncu.mdl olacak
Ama ct de farklı t de farklı skin yani futbol modu ya her takımın forması farklı. Yani ctmodeloyuncu.mdl tmodeloyuncu.mdl
Birde /kaleci yazınca t ise t nin kaleci skini ct ise ctnin kaleci skini olacak
Yani ctkaleci.mdl tkaleci.mdl
Bir de kalecilerin ortak 1 bıçak skini olacak iki takım içinde ortak
Kalecibicak.mdl
Toplam 5 model olacak
/Kaleci yazınca kaleci skini alacak takımına göre /oyuncu yazınca eski normal skinine geri dönecek t ise tmodeloyuncu.mdl ct ise ctmodeloyuncu.mdl olacak
buyur içinde model yolları yazıyor ona göre kur çalışacaktır
PHP Kod:
/**
* Created by AMXX-Stuido
* User: ITenGriTR
* Date: 21.02.2020
* Time 22.30
*/
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
/************************************************************************
-= Defines =-
************************************************************************/
#define sD_ChatTag "!n[ !tWEBAilesi !n]"
#define sD_KeeperTmdl "models/player/tkaleci/tkaleci.mdl"
#define sD_KeeperCTmdl "models/player/ctkaleci/ctkaleci.mdl"
#define sD_PlayerTmdl "models/player/toyuncu/toyuncu.mdl"
#define sD_PlayerCTmdl "models/player/ctoyuncu/ctoyuncu.mdl"
#define sD_Keeperknife "models/kalecibicak/gkbicak.mdl"
#define sD_KeeperTname "tkaleci"
#define sD_KeeperCTname "ctkaleci"
#define sD_PlayerTname "toyuncu"
#define sD_PlayerCTname "ctoyuncu"
/************************************************************************
-= Datas =-
************************************************************************/
new iG_Keepers,iG_KeeperSecret;
/************************************************************************
-= Registers =-
************************************************************************/
public plugin_precache(){
precache_model(sD_KeeperTmdl);
precache_model(sD_KeeperCTmdl);
precache_model(sD_PlayerCTmdl);
precache_model(sD_KeeperTmdl);
precache_model(sD_Keeperknife);
}
public plugin_init(){
register_plugin
("Naber",
"1.0",
"Berk");
register_clcmd("say /oyuncu","pP_BePlayer");
register_clcmd("say /kaleci","pP_BeKeeper");
register_logevent("pE_RoundStart",2,"1=Round_Start");
register_event("CurWeapon","pE_ChangeWeapon","be","1=1");
}
/************************************************************************
-= System =-
************************************************************************/
public pP_BePlayer(iP_ID){
if(~iG_Keepers & (1<<iP_ID)){
sColoredChat(iP_ID,"%s !gZaten bir oyuncusun!n!",sD_ChatTag);
return PLUGIN_HANDLED;
}
new iL_Team = get_user_team(iP_ID);
iG_Keepers &= ~(1<<iP_ID);
iG_KeeperSecret &= ~(1<<iL_Team);
sColoredChat(iP_ID,"%s !gBasarili bir sekilde !tkalecilik !gten ayrildin!n!",sD_ChatTag);
return PLUGIN_CONTINUE;
}
public pP_BeKeeper(iP_ID){
if(iG_Keepers & (1<<iP_ID)){
sColoredChat(iP_ID,"%s !gZaten bir kalecisin!n!",sD_ChatTag);
return PLUGIN_HANDLED;
}
new iL_Team = get_user_team(iP_ID);
if(iG_KeeperSecret & (1<<iL_Team)){
sColoredChat(iP_ID,"%s !gZaten bulundugun takimin bir kalecisi var!n!",sD_ChatTag);
return PLUGIN_HANDLED;
}
iG_Keepers |= (1<<iP_ID);
iG_KeeperSecret |= (1<<iL_Team);
sColoredChat(iP_ID,"%s !gBasarili bir sekilde !toyunculuk !gten ayrildin!n!",sD_ChatTag);
return PLUGIN_CONTINUE;
}
public pE_RoundStart(){
remove_task();
set_task(0.1,"pT_RoundStart",0);
}
public pT_RoundStart(){
new sL_Players[32],iL_Num,iL_GetID,iL_Team;
get_players(sL_Players,iL_Num);
for(new i; i < iL_Num; i++){
iL_GetID = sL_Players[i];
iL_Team = get_user_team(iL_GetID);
if(iG_Keepers & (1<<iL_GetID)){
switch(iL_Team){
case 1 : {
cs_set_user_model(iL_GetID,sD_KeeperTname);
}
case 2 : {
cs_set_user_model(iL_GetID,sD_KeeperCTname);
}
}
}
else{
switch(iL_Team){
case 1 : {
cs_set_user_model(iL_GetID,sD_PlayerTname);
}
case 2 : {
cs_set_user_model(iL_GetID,sD_PlayerCTname);
}
}
}
}
}
public pE_ChangeWeapon(iP_ID) {
new iL_WeaponID = read_data(2);
if(iL_WeaponID == CSW_KNIFE && iG_Keepers & (1<<iP_ID)) {
set_pev(iP_ID,pev_viewmodel2,sD_Keeperknife);
}
}
#if AMXX_VERSION_NUM < 183
stock sColoredChat(const id, const input[], any:...){
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!n", "^x01"); // Default Renk(Sary)
replace_all(msg, 190, "!g", "^x04"); // Ye?il Renk
replace_all(msg, 190, "!t", "^x03"); // Takym Renk( CT mavi , T kyrmyzy )
if (id) players[0] = id; else get_players(players, count, "ch");{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
#else
stock sColoredChat(const id, const input[], any:...){
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!n", "^x01");
replace_all(msg, 190, "!g", "^x04");
replace_all(msg, 190, "!t", "^x03");
client_print_color(id, id, msg);
}
#endif
Benzer Konular
Yorum
11.815
Okunma
19-09-2024, 03:38
)


