Hello all i am wanting to know how to make it so if i typed !giveplayercredits STEAMID 100
it would give the player 100 credits i know how to make a command to give it to my self using points[client]+= 100 but i cant figure out how to do it if i wanted to give another player credits
Code:
new points[MAXPLAYERS+1];
Alright guys i tryed this it gives me no errors and compiles when im in game the cmd seems to work but im not getting anycredits any ideas?
Code:
public Action:GiveCredits(client, args)
{
if (args != 2)
{
ReplyToCommand(client, "[SM] Usage: sm_send <steamid> <amount>");
return Plugin_Handled;
}
decl String:steamid[64];
GetCmdArg(1, steamid, sizeof(steamid));
decl String:samount[64];
GetCmdArg(2, samount, sizeof(samount));
new amount = StringToInt(samount);
points[steamid[client]]+=amount;
return Plugin_Handled;
}
__________________