Message( "** Admin " + player.Name + " has rewarded " + mon + " for Reason " + reason );
how i can convert it to annouceall i try but cmds leaves works and no console error
and when i type / reward nickid mon reason
and came admin killer has rewarded to sadam 5000 for reason 500 how i can delete the 500 from message killing of sada
I can't understand what u wanted to say, except the announce all one
For the announceall, try this
AnnounceAll( "** Admin " + player.Name + " has rewarded " + mon + " for Reason " + reason, 3 );
Use text.slice( ). post your cmd for more help
not annoucing and i sayed coming text with reson of amount i want to do not come amount with reason
and another question how to add admin pass in server config
Quote from: xxkillerxx on Sep 13, 2015, 06:28 PMnot annoucing and i sayed coming text with reson of amount i want to do not come amount with reason
and another question how to add admin pass in server config
:(( Still then can't understand, GOD HELP ME!
Post your code.
how to add admin pass in server.cfg and not announcing the message and which talk you didnt understanding watch screen shot
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi61.tinypic.com%2Fetisjt.jpg&hash=be18a2b1f0fa0dc876ae506f475fb363b14afcae)
removed by myself
Change :
local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
To :
local reason = GetTok( text, " ", 3, NumTok( text, " " ) );
Done.
thanx xmair all prob solved but how to change message to annouceall
What Difficult??
AnnounceAll( "Your Text", 8 );
AnnounceAll( "** Admin " + player.Name + " has rewarded " + mon + " for Reason " + reason, 3 );
finch kakan sir give me this not works whats wrong with it
Explain what's not working.
i dont know whats not working no console error but not announcing
is its too hard no one ables to solve???
Post your reward command then we will be able to solve it
As i wondered that you are trying to create a reward cmd but occur some problem so i decided to create it for you Try it
else if (cmd =="reward")
{
if(!text) MessagePlayer("syntax: /reward <nick/id> <amount> <reason>",player);
else
{
local plr = GetPlayer(GetTok(text, " ",1)), rew = GetTok(text, " ",2), reason = GetTok(text, " ",3 NumTok(text, " "));
if (!plr) MessagePlayer("invalid nick/id",player);
else if(!rew) MessagePlayer("Reward not specified",player);
else if(!IsNum(rew)) MessagePlayer("Reward must be integer/number",player);
else
{
if(!reason) reason = "None";
IncCash(plr, rew.tointeger());
AnnounceAll("Admin "+player.Name+" Given Reward of "+rew.tointeger()+"$ to "+plr.Name+", Reason: "+reason);
}
}
}
updated: added IncCash, added Reason
thank you kusangi
if you can solve this bug so will much good or not so no problem
else if ( cmd == "reward" )
{
if ( IsNoob( player, cmd ) ) return 0;
else if ( !text ) ePrivMessage( "Syntax, /c " + cmd + " <Nick/ID> <Money> ", player );
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) ePrivMessage( "Unknown Player..", player );
else
{
local mon = GetTok( text, " ", 2);
if (!IsNum(mon)) ePrivMessage("Amount Must Be In Numbers..",player);
else
{
Message("[#007fff]Admin [#f0e130]" + player.Name + " [#007fff]Awarded [#00ff00]" + plr.Name + "[#007fff] with: [#ff033e]" + mon + " [#007fff]c@$h.");
IncCash( plr, mon.tointeger() );
{
local reason = GetTok( text, " ", 3, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
Announce( "** Admin " + player.Name + " has rewarded " + mon + " for Reason " + reason, 3 );
}
}
}
}[code]
Quote from: xxkillerxx on Sep 16, 2015, 12:44 PMif you can solve this bug so will much good or not so no problem
else if ( cmd == "reward" )
{
if ( IsNoob( player, cmd ) ) return 0;
else if ( !text ) ePrivMessage( "Syntax, /c " + cmd + " <Nick/ID> <Money> ", player );
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) ePrivMessage( "Unknown Player..", player );
else
{
local mon = GetTok( text, " ", 2);
if (!IsNum(mon)) ePrivMessage("Amount Must Be In Numbers..",player);
else
{
Message("[#007fff]Admin [#f0e130]" + player.Name + " [#007fff]Awarded [#00ff00]" + plr.Name + "[#007fff] with: [#ff033e]" + mon + " [#007fff]c@$h.");
IncCash( plr, mon.tointeger() );
{
local reason = GetTok( text, " ", 3, NumTok( text, " " ) );
if ( reason == null ) reason = "None"
Announce( "** Admin " + player.Name + " has rewarded " + mon + " for Reason " + reason, 3 );
}
}
}
}[code]
There is no bug but it would be nice if you use that i posted because that is far better than this one, i updated cmd you can copy again
will you update your cmds to add reason please
Use this one:-
else if (cmd =="reward")
{
if(!text) MessagePlayer("syntax: /reward <nick/id> <amount>",player);
else
{
local plr = GetPlayer(GetTok(text, " ",1)), rew = GetTok(text, " ",2);
if (!plr) MessagePlayer("invalid nick/id",player);
else if(!rew) MessagePlayer("Reward not specified",player);
else if(!IsNum(rew)) MessagePlayer("Reward must be integer/number",player);
local reason = GetTok( text, " ", 3 NumTok( text, " " ) );
if(!reason) reason = "None";
else
{
IncCash(plr, rew.tointeger());
AnnounceAll("Admin "+player.Name+" Given Reward of
"+rew.tointeger()+"$ to "+plr.Name+". Reason: " + reason);
}
}
}
error
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi61.tinypic.com%2Fj5gms3.png&hash=e687e46d1f4b07f1b2b955cc1cad3e4ed2f97ef0)
Show us the error line
line # 84 dofile( "Cmds.nut" );
Mistakely KAKAN has pressed his enter key while typing the text of AnnounceAll which made the message to separate as 2 lines.
Change your
AnnounceAll("Admin "+player.Name+" Given Reward of
"+rew.tointeger()+"$ to "+plr.Name+". Reason: " + reason);
to
AnnounceAll("Admin "+player.Name+" Given Reward of "+rew.tointeger()+"$ to "+plr.Name+". Reason: " + reason);
const BELIEBER = "YOU NO
GET IT!";
I already update my code ;D
thanks to mashreq kakan kusnangi