I builded it this far:
Code Select
else if (cmd == "setwep")
{
local plr = GetPlayer(GetTok(text, " ", 1));
if ( !text ) MessagePlayer( "[#ffd700]Syntax: /"+ cmd +" <playername>", player );
if (PlayerIsAdmin)
{
plr.GiveWeapon( text.tofloat(), 999 );
Message("[#ff0000]-> [#FF0000]Admin [#ffffff]"+ player.Name +" gave "+ plr.Name +"");
}
}
but it gives me error:Code Select
AN ERROR HAS OCCURED [cannot convert the string]
CALLSTACK
*FUNCTION [onPlayerCommand()] Main.nut line [407]
LOCALS
[plr] INSTANCE
[plr] INSTANCE
[i] 2
[text] " ult spas"
[cmd] "setwep"
[player] INSTANCE
[this] TABLE
Help fast plz. Thanx