Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[rezolvat]Plugin credite pe mapa
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
855
zp.Bodo
[Creep]
Status: Offline
(since 17-11-2019 13:51)
Joined: 15 Jun 2014
Posts: 663
,
Topics: 166
Location:
Romania
Reputation:
548.2
Votes
: 20
Posted: 19-04-2015, 10:22:17
| Translate post to:
... (
Click for more languages
)
As vrea urmatoarele modificari la acest plugin:
- vreau sa de o singura data la 10 minute jucate pe server (pe harta respectiva)
- si sa dea la sfarsit de mapa cu un mesaj (pentru ca ai stat toata mapa pe server ai primit x credite)
- cei care stau spectator sa nu li se ia in considerare
Spoiler:
/*============================================ ====================================
=
= Plugin: Time Present's
= Version: 0.1
= Version mod: Zombie Plague
=
=
= Description:
= - This is plugin add in game presents.
= Presents are given every 3 min, 5 min, 10 min.
=
= Defaults:
= 3 min - 3 Ammo Packs
= 5 min - 5 Ammo Packs
= 10 min - 10 Ammo Packs
=
=
============================================= ====================================*/
#include <amxmodx>
#include <zombieplague>
/*============================================ ====================================
[Macros]
============================================= ====================================*/
#define SMALL 10
#define AVERAGE 20
#define LARGE 35
/*============================================ ====================================
[Plugin Init]
============================================= ====================================*/
public plugin_init()
{
register_plugin("Time Presents", "1.0", "MasteX")
}
/*============================================ ====================================
[Set Tasks]
============================================= ====================================*/
public client_putinserver(id)
{
set_task(600.0, "small_present", id)
set_task(1200.0, "average_present", id)
set_task(2100.0, "large_present", id)
}
/*============================================ ====================================
[Remove Task]
============================================= ====================================*/
public client_disconnect(id)
{
if(task_exists(id))
remove_task(id)
}
/*============================================ ====================================
[Give Presents]
============================================= ====================================*/
public small_present(id)
{
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + SMALL)
client_printcolor(id, "^4[Time Presents] ^1You got ^4%d ammo packs^1, for that play on this server for^4 10 minutes.", SMALL)
}
public average_present(id)
{
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + AVERAGE)
client_printcolor(id, "^4[Time Presents] ^1You got ^4%d ammo packs^1, for that play on this server for^4 10 minutes.", AVERAGE)
}
public large_present(id)
{
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + LARGE)
client_printcolor(id, "^4[Time Presents] ^1You got ^4%d ammo packs^1, for that play on this server for^4 35minutes.", LARGE)
}
/*============================================ ====================================
[Stock]
============================================= ====================================*/
stock client_printcolor(const id, const input[], any:...)
{
new iCount = 1, iPlayers[32]
static szMsg[191]
vformat(szMsg, charsmax(szMsg), input, 3)
replace_all(szMsg, 190, "/g", "^4")
replace_all(szMsg, 190, "/y", "^1")
replace_all(szMsg, 190, "/ctr", "^1")
replace_all(szMsg, 190, "/w", "^0")
if(id) iPlayers[0] = id
else get_players(iPlayers, iCount, "ch")
for (new i = 0; i < iCount; i++)
{
if(is_user_connected(iPlayers[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, iPlayers[i])
write_byte(iPlayers[i])
write_string(szMsg)
message_end()
}
}
}
Contact Skype | zm.bodo
Grup Facebook |
CSRO 2k17+
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 19-04-2015, 10:46:49
| Translate post to:
... (
Click for more languages
)
Poftim sper sa nu fii uitat ceva .
EDIT:Stai ca uitai ceva ,cat timp dureaza o mapa la tne in minute cate min are 30-20??
Spoiler:
/*============================================ ====================================
=
= Plugin: Time Present's
= Version: 0.1
= Version mod: Zombie Plague
=
=
= Description:
= - This is plugin add in game presents.
= Presents are given every 10 min.
=
= Defaults:
= 10 min - 10 Ammo Packs
=
=
============================================= ====================================*/
#include <amxmodx>
#include <zombieplague>
#include <cstrike>
/*============================================ ====================================
[Macros]
============================================= ====================================*/
#define LARGE 35
/*============================================ ====================================
[Plugin Init]
============================================= ====================================*/
public plugin_init()
{
register_plugin("Time Presents", "1.0", "MasteX")
}
/*============================================ ====================================
[Set Tasks]
============================================= ====================================*/
public client_putinserver(id)
{
if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)
return PLUGIN_HANDLED
set_task(2100.0, "large_present", id)
return PLUGIN_CONTINUE
}
/*============================================ ====================================
[Remove Task]
============================================= ====================================*/
public client_disconnect(id)
{
if(task_exists(id))
remove_task(id)
}
/*============================================ ====================================
[Give Presents]
============================================= ====================================*/
public large_present(id)
{
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + LARGE)
client_printcolor(id, "^4[Time Presents] ^1You got ^4%d ammo packs^1, for that play on this server for^4 35minutes.", LARGE)
}
/*============================================ ====================================
[Stock]
============================================= ====================================*/
stock client_printcolor(const id, const input[], any:...)
{
new iCount = 1, iPlayers[32]
static szMsg[191]
vformat(szMsg, charsmax(szMsg), input, 3)
replace_all(szMsg, 190, "/g", "^4")
replace_all(szMsg, 190, "/y", "^1")
replace_all(szMsg, 190, "/ctr", "^1")
replace_all(szMsg, 190, "/w", "^0")
if(id) iPlayers[0] = id
else get_players(iPlayers, iCount, "ch")
for (new i = 0; i < iCount; i++)
{
if(is_user_connected(iPlayers[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, iPlayers[i])
write_byte(iPlayers[i])
write_string(szMsg)
message_end()
}
}
}
Retired from Amxmodx
Last edited by
destroi112
on 19-04-2015, 12:20:14; edited 1 time in total
0
0
Back to top
zp.Bodo
[Creep]
Status: Offline
(since 17-11-2019 13:51)
Joined: 15 Jun 2014
Posts: 663
,
Topics: 166
Location:
Romania
Reputation:
548.2
Votes
: 20
Posted: 19-04-2015, 11:23:47
| Translate post to:
... (
Click for more languages
)
imi da eroarea asta:
zpcreditemapa.sma(40) : error 017: undefined symbol "cs_get_user_team"
1 Error.
Compilarea a esuat!
Contact Skype | zm.bodo
Grup Facebook |
CSRO 2k17+
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 19-04-2015, 12:19:28
| Translate post to:
... (
Click for more languages
)
Pt ca nu l-am terminat aia e de la #include<cstrike> dar cate minute are mapa ta??? ca sa iti fac tot in el.
Poftim sa il traduci si tu
Spoiler:
#include <amxmodx>
#include <zombieplague>
#include <cstrike>
#pragma tabsize 0
#define LARGE 10
#define BOMBOANA 45
#define TIMP_MAPA 35
new NumaraMinutele[33];
public plugin_init()
{
register_plugin("Time Presents", "1.0", "MasteX")
}
/*============================================ ====================================
[Set Tasks]
============================================= ====================================*/
public client_putinserver(id)
{
if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)
return PLUGIN_HANDLED
set_task(600.0, "large_present", id)
set_task(60.0, "FaceMinute", id, _, _, "b")
set_task(2100.0, "DamBomboana", id)
return PLUGIN_CONTINUE
}
/*============================================ ====================================
[Remove Task]
============================================= ====================================*/
public client_connect(id)
{
NumaraMinutele[id] = 0;
}
public client_disconnect(id)
{
NumaraMinutele[id] = 0;
if(task_exists(id))
remove_task(id)
}
public FaceMinute(id)
{
if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)
return PLUGIN_HANDLED;
NumaraMinutele[id] += 1;
return PLUGIN_HANDLED;
}
/*============================================ ====================================
[Give Presents]
============================================= ====================================*/
public large_present(id)
{
if(NumaraMinutele[id] >= 9 && cs_get_user_team(id) != CS_TEAM_SPECTATOR)
{
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + LARGE)
client_printcolor(id, "^4[Time Presents] ^1You got ^4%d ammo packs^1, for that play on this server for^4 10 minutes.", LARGE)
}
}
public DamBomboana(id)
{
if(NumaraMinutele[id] == TIMP_MAPA && cs_get_user_team(id) != CS_TEAM_SPECTATOR)
{
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + BOMBOANA)
client_printcolor(id, "^4[Time Presents] ^1You got ^4%d ammo packs^1, for that play on this server for^4 jucat pe toata mapa .", BOMBOANA)
}
}
/*============================================ ====================================
[Stock]
============================================= ====================================*/
stock client_printcolor(const id, const input[], any:...)
{
new iCount = 1, iPlayers[32]
static szMsg[191]
vformat(szMsg, charsmax(szMsg), input, 3)
replace_all(szMsg, 190, "/g", "^4")
replace_all(szMsg, 190, "/y", "^1")
replace_all(szMsg, 190, "/ctr", "^1")
replace_all(szMsg, 190, "/w", "^0")
if(id) iPlayers[0] = id
else get_players(iPlayers, iCount, "ch")
for (new i = 0; i < iCount; i++)
{
if(is_user_connected(iPlayers[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, iPlayers[i])
write_byte(iPlayers[i])
write_string(szMsg)
message_end()
}
}
}
Si sa pui timpu de la mapa ta acolo daca nu iti merge lasi aici measj oricum cred ca mai bine nu puneam sa ii numere ca era tot una cu task-ul dar task-ul dadea tuturor indiferent de minute.
Retired from Amxmodx
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Locked by
EDUTz
, 15 May 2015 13:06
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 04-08-2025, 01:23:27
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details