Reward System

Started by MRSK143, Jun 22, 2021, 05:23 PM

Previous topic - Next topic

MRSK143

Hi Guyz I Made Simple Reward System ;D

Warning You Can Use This CMD Only Using My Staff Level System
Staff Level System Link:
https://forum.vc-mp.org/?topic=8560.new#new

Here The Cmd Add This Into onPlayerCommand

else if( cmd == "reward" )
{
if( Admin[ player.ID ] == true )
{
if ( text )
{
local plr = GetPlayer( GetTok( text, " ", 1 ) ), ammount = GetTok( text, " ", 2 );
ammount = ammount.tointeger();
if ( !plr )
{
if( !IsNum( ammount ) )
{
plr.GiveMoney(ammount.tointeger());
Message( "[#FFbb00]** Admin " + player.Name + " Has Rewarded "+plr.Name+" Ammount "+ammount  ");
}
else MessagePlayer( "[#db0000]Money Must Be Integer.", player );
}
else MessagePlayer("[#db0000]Unknown player.", player);
}
else MessagePlayer("Syntax; /reward <player Name> <ammount>.", player);
}
else MessagePlayer("[#db0000]Unknown command.", player);
}

@mR_Sk@

DizzasTeR

So everyone can set anyone's admin status, I think thats not quite right

MRSK143

Quote from: DizzasTeR on Jun 23, 2021, 02:41 AMSo everyone can set anyone's admin status, I think thats not quite right
Updated The Code
@mR_Sk@

Jutt

bro give me reward system without level system plz
Jutt

Gito Baloch

Quote from: Jutt on Jul 04, 2021, 08:35 PMbro give me reward system without level system plz

Without Level/Admin Systemelse if( cmd == "reward" )
{
if ( text ) MessagePlayer("[#ff0000]Error: "/reward <plr> <ammount>"", player);
{
local plr = GetPlayer( GetTok( text, " ", 1 ) ), cash = GetTok( text, " ", 2 );
cash = ammount.tointeger();
if ( !plr ) MessagePlayer("[#ff0000]Error: Unknown player.", player);
{
if( !IsNum( cash ) ) MessagePlayer( "[#ff0000]Error: Money Must Be Integer.", player );
{
plr.GiveMoney(cash.tointeger());
Message( "[#ffffff]"+ player.Name + "[#ff0000] has rewarded [#ffffffff]"+plr.Name+"[#ff0000] With Ammount[#ffffff] "+cash+".");
}
}
}
}


With Level/Admin Systemelse if( cmd == "reward" )
{
if (stats[player.ID].Level < 2 ) MessagePlayer("[#ff0000]Error: Access Denied.",player);
else if ( text ) MessagePlayer("[#ff0000]Error: "/reward <plr> <ammount>"", player);
{
local plr = GetPlayer( GetTok( text, " ", 1 ) ), cash = GetTok( text, " ", 2 );
cash = ammount.tointeger();
if ( !plr ) MessagePlayer("[#ff0000]Error: Unknown player.", player);
{
if( !IsNum( cash ) ) MessagePlayer( "[#ff0000]Error: Money Must Be Integer.", player );
{
plr.GiveMoney(cash.tointeger());
Message( "[#ffffff]"+ player.Name + "[#ff0000] has rewarded [#ffffffff]"+plr.Name+"[#ff0000] With Ammount[#ffffff] "+cash+".");
}
}
}
}
Programming is the language I speak, the world I shape, and the future I code