KrooB

  • Full Member
  • BEN TÜRKÜM
  • Posts: 117
Re: Account System
« Reply #30,  »
Quote from =RK=MarineForce on May 17th, 05:57 PM
Code: [Select]
[code]else if (cmd=="setkills")
{
if ( stats[ player.ID ].level < 5 )  return MessagePlayer( "[#FF0000][Error] - You Need At Least Level 5 To Use This Command.", player);
else if ( !text ) MessagePlayer("[#FF0000]Usage: /" + cmd + " <Player/ID> <kills>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
local kills = GetTok(text, " ", 2); // help i don't know GetTko(text, " ", 2 ); copied frm setlevel
if ( !plr ) MessagePlayer("[#FF0000][Error] - Invalid Player.", player );
else if (!IsNum(kills)) return MessagePlayer("[#FF0000]kills Value Must Be In Number",player); /// i learned somoe thing. what is getok bro?
else{
stats[plr.ID].kills = kills.tointeger();
Message(" " + plr.Name + " " + kills + " kills has been set by [#F5FFFA][ADMIN] " + player.Name + " ");
}
}
}

else if (cmd=="setdeaths")
{
if ( stats[ player.ID ].level < 5 )  return MessagePlayer( "[#FF0000][Error] - You Need At Least Level 5 To Use This Command.", player);
else if ( !text ) MessagePlayer("[#FF0000]Usage: /" + cmd + " <Player/ID> <death>", player );
else {
local plr = GetPlayer( GetTok( text, " ", 1 ) );
local deaths = GetTok(text, " ", 2); // help i don't know GetTko(text, " ", 2 ); copied frm setlevel
if ( !plr ) MessagePlayer("[#FF0000][Error] - Invalid Player.", player );
else if (!IsNum(deaths)) return MessagePlayer("[#FF0000]deaths Value Must Be In Number",player); /// i learned somoe thing. what is getok bro?
else{
stats[plr.ID].deaths = deaths.tointeger();
Message(" " + plr.Name + " " + deaths + " Deaths has been set by [#F5FFFA][ADMIN] " + player.Name + " ");
}
}
}

Thanks bro but i don't know how gettok works.
u can try it
We are his people !
Who can challange us ?

=RK=MarineForce

  • Sr. Member
  • WAR IS HELL!
  • Posts: 445
Re: Account System
« Reply #31,  »
join this server: 36.255.103.90:8192


GetPlayer(GetTok(text, "WHAT IS THIS?", ) );
Try to UnderStand ME!

Athanatos

  • Hero Member
  • Romania Cops N Robbers Lead Developer
  • Posts: 777
Re: Account System
« Reply #32,  »
GetTok(text,separator,index) . Do I have to explain every parameter?

dracc

  • Jr. Member
  • Posts: 84