Quote:
Originally Posted by Rajat_Pawar
This is psuedo CODE, I expect you to complete it.
pawn Код:
CMD:rob(playerid) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); foreach(new i:Player) { if(!IsPlayerInRangeOfPoint(i, 5, x, y, z)) continue; else { GivePlayerMoney(playerid, ( GetPlayerMoney(i) / 100 ) * 20 ); // new st[128]; format(st, 128, "You have robbed %s of $ %d" .. ) SendClientMessage(playerid, -1, st); } } }
|
You made a command which will make the player rob everyone who's near him, that's not what the guy asked. Although that command is useful.