Unpaid Requests, Public Plugins
-
sPe3doN
- Senior Member
- Posts: 258
- Joined: 7 years ago
-
Contact:
-
Quote
-
0
login to like this post
#1
Post
by sPe3doN » 5 years ago
Hi can someone help me here when i use this plugin in normal mod msg show for 10 sec but when i use it in ZE mod show it only for 1 sec
Code: Select all
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "Welcome Msg"
#define VERSION "1.0"
#define AUTHOR "GmTx"
new bool:gbSpawned[33];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1)
}
public client_connect(id)
{
gbSpawned[id] = false;
}
public Player_Spawn(id)
{
if(!gbSpawned[id] && is_user_alive(id))
{
new name[32]
get_user_name(id, name, 31)
set_hudmessage(0, 0, 255, -1.0, -1.0)
show_hudmessage(id, "Welcome %s to zombie escape mod^nEnjoy with us GL have fun", name)
}
}
-
Raheem
- Mod Developer
- Posts: 2214
- Joined: 7 years ago
-
Contact:
-
Quote
-
0
login to like this post
#2
Post
by Raheem » 5 years ago
I used SyncObject to ensure that this message won't be overwritten, try:
Code: Select all
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "Welcome Msg"
#define VERSION "1.0"
#define AUTHOR "GmTx"
new bool:gbSpawned[33];
new g_iHUDSyncObject
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1)
g_iHUDSyncObject = CreateHudSyncObj()
}
public client_connect(id)
{
gbSpawned[id] = false;
}
public Player_Spawn(id)
{
if(!gbSpawned[id] && is_user_alive(id))
{
new name[32]
get_user_name(id, name, 31)
set_hudmessage(0, 0, 255, -1.0, -1.0, 0, 1.0, 8.0, 0.1, 0.2)
ShowSyncHudMsg(id, g_iHUDSyncObject, "Welcome %s to zombie escape mod^nEnjoy with us GL have fun", name)
}
}
He who fails to plan is planning to fail
-
sPe3doN
- Senior Member
- Posts: 258
- Joined: 7 years ago
-
Contact:
-
Quote
-
0
login to like this post
#3
Post
by sPe3doN » 5 years ago
Raheem wrote: ↑5 years ago
I used SyncObject to ensure that this message won't be overwritten, try:
Code: Select all
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "Welcome Msg"
#define VERSION "1.0"
#define AUTHOR "GmTx"
new bool:gbSpawned[33];
new g_iHUDSyncObject
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1)
g_iHUDSyncObject = CreateHudSyncObj()
}
public client_connect(id)
{
gbSpawned[id] = false;
}
public Player_Spawn(id)
{
if(!gbSpawned[id] && is_user_alive(id))
{
new name[32]
get_user_name(id, name, 31)
set_hudmessage(0, 0, 255, -1.0, -1.0, 0, 1.0, 8.0, 0.1, 0.2)
ShowSyncHudMsg(id, g_iHUDSyncObject, "Welcome %s to zombie escape mod^nEnjoy with us GL have fun", name)
}
}
The same problem don't work
-
Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
-
Contact:
-
Quote
-
0
login to like this post
#5
Post
by Night Fury » 5 years ago
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "Welcome Msg"
#define VERSION "1.0"
#define AUTHOR "GmTx"
new bool:gbSpawned[33];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1)
}
public client_connect(id)
{
gbSpawned[id] = false;
}
public Player_Spawn(id)
{
if(!gbSpawned[id] && is_user_alive(id))
{
set_task(10.0, "ShowMsg", id, _, _, "b")
}
}
public ShowMsg(id)
{
new name[32]
get_user_name(id, name, 31)
set_hudmessage(0, 0, 255, -1.0, -1.0)
show_hudmessage(id, "Welcome %s to zombie escape mod^nEnjoy with us GL have fun", name)
}
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
-
Raheem
- Mod Developer
- Posts: 2214
- Joined: 7 years ago
-
Contact:
-
Quote
-
0
login to like this post
#6
Post
by Raheem » 5 years ago
This message will show forever jack, he need it only 10 seconds.
Task is good idea
He who fails to plan is planning to fail
-
sPe3doN
- Senior Member
- Posts: 258
- Joined: 7 years ago
-
Contact:
-
Quote
-
0
login to like this post
#7
Post
by sPe3doN » 5 years ago
Raheem wrote: ↑5 years ago
This message will show forever jack, he need it only 10 seconds.
Task is good idea
yes its for ever and i want only first 10 seconds jack
-
Spir0x
- Veteran Member
- Posts: 641
- Joined: 7 years ago
- Location: Tunisia
-
Contact:
-
Quote
-
0
login to like this post
#8
Post
by Spir0x » 5 years ago
I want this plugin too fix it please.
-
Raheem
- Mod Developer
- Posts: 2214
- Joined: 7 years ago
-
Contact:
-
Quote
-
0
login to like this post
#9
Post
by Raheem » 5 years ago
Try:
Code: Select all
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "Welcome Msg"
#define VERSION "1.0"
#define AUTHOR "GmTx"
new bool:gbSpawned[33], Float:g_flStartTime[33];
new g_iHUDSyncObject
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1)
g_iHUDSyncObject = CreateHudSyncObj()
}
public client_connect(id)
{
gbSpawned[id] = false;
}
public Player_Spawn(id)
{
if(!gbSpawned[id] && is_user_alive(id))
{
set_task(0.5, "ShowMsg", id, _, _, "b")
g_flStartTime[id] = get_gametime()
}
}
public ShowMsg(id)
{
if (g_flStartTime[id] + 10.0 >= get_gametime())
{
remove_task(id)
g_flStartTime[id] = 0.0
return
}
new name[32]
get_user_name(id, name, 31)
set_hudmessage(0, 0, 255, -1.0, -1.0, 0, 1.0, 0.5, 0.1, 0.2)
ShowSyncHudMsg(id, g_iHUDSyncObject, "Welcome %s to zombie escape mod^nEnjoy with us GL have fun", name)
}
He who fails to plan is planning to fail
-
sPe3doN
- Senior Member
- Posts: 258
- Joined: 7 years ago
-
Contact:
-
Quote
-
0
login to like this post
#10
Post
by sPe3doN » 5 years ago
Raheem wrote: ↑5 years ago
Try:
Code: Select all
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "Welcome Msg"
#define VERSION "1.0"
#define AUTHOR "GmTx"
new bool:gbSpawned[33], Float:g_flStartTime[33];
new g_iHUDSyncObject
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1)
g_iHUDSyncObject = CreateHudSyncObj()
}
public client_connect(id)
{
gbSpawned[id] = false;
}
public Player_Spawn(id)
{
if(!gbSpawned[id] && is_user_alive(id))
{
set_task(0.5, "ShowMsg", id, _, _, "b")
g_flStartTime[id] = get_gametime()
}
}
public ShowMsg(id)
{
if (g_flStartTime[id] + 10.0 >= get_gametime())
{
remove_task(id)
g_flStartTime[id] = 0.0
return
}
new name[32]
get_user_name(id, name, 31)
set_hudmessage(0, 0, 255, -1.0, -1.0, 0, 1.0, 0.5, 0.1, 0.2)
ShowSyncHudMsg(id, g_iHUDSyncObject, "Welcome %s to zombie escape mod^nEnjoy with us GL have fun", name)
}
not work
-
Raheem
- Mod Developer
- Posts: 2214
- Joined: 7 years ago
-
Contact:
-
Quote
-
0
login to like this post
#11
Post
by Raheem » 5 years ago
Explain what the problem you faced....
He who fails to plan is planning to fail
-
sPe3doN
- Senior Member
- Posts: 258
- Joined: 7 years ago
-
Contact:
-
Quote
-
0
login to like this post
#12
Post
by sPe3doN » 5 years ago
Raheem wrote: ↑5 years ago
Explain what the problem you faced....
not show the msg
-
Spir0x
- Veteran Member
- Posts: 641
- Joined: 7 years ago
- Location: Tunisia
-
Contact:
-
Quote
-
0
login to like this post
#13
Post
by Spir0x » 5 years ago
Yes same problem the hud message never appears.
-
SexY DeviL CJ
- Mod Tester
- Posts: 73
- Joined: 6 years ago
-
Contact:
-
Quote
-
0
login to like this post
#14
Post
by SexY DeviL CJ » 5 years ago
Check your server console it must throw some error if your plugin is not showing up in server check your logs in your panel
......Devil Was Here......
-
sPe3doN
- Senior Member
- Posts: 258
- Joined: 7 years ago
-
Contact:
-
Quote
-
0
login to like this post
#15
Post
by sPe3doN » 5 years ago
SexY DeviL CJ wrote: ↑5 years ago
Check your server console it must throw some error if your plugin is not showing up in server check your logs in your panel
I check it befor plugin dont have any error in consol
-
Raheem
- Mod Developer
- Posts: 2214
- Joined: 7 years ago
-
Contact:
-
Quote
-
0
login to like this post
#17
Post
by Raheem » 5 years ago
#include <amxmodx>
#include <hamsandwich>
#define PLUGIN "Welcome Msg"
#define VERSION "1.0"
#define AUTHOR "GmTx"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1)
}
public Player_Spawn(id)
{
set_task(0.5, "ShowMsg", id, _, _, "a", 20)
}
public ShowMsg(id)
{
new name[32]
get_user_name(id, name, 31)
set_hudmessage(0, 255, 0, -1.0, 0.35, 0, 1.0, 0.5, 0.1, 0.2)
show_hudmessage(id, "Welcome %s to zombie escape mod^nEnjoy with us GL have fun", name)
}
public client_disconnected(id)
{
remove_task(id)
}
He who fails to plan is planning to fail
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Register
Sign in
Users browsing this forum: No registered users and 0 guests