27.06.2018, 01:19
Quote:
post here the code of weapon-config
ans show some of other commands |
These are two commands that are similar to the two commands I'm having issues with, in that they both deal with setting health/armor. Both work.
Код:
CMD<AD1>:shp(cmdid, playerid, params[]) { new targetid, amount; if(sscanf(params, "ui", targetid, amount)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /shp [playerid] [amount]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, NOPLAYER); if(LoggedIn[targetid] != true) return SendClientMessage(playerid, COLOR_RED, NOTLOGGEDIN); SetPlayerHealth(targetid, amount); new buf[150]; format(buf, sizeof(buf), "You have set %s's health to %d.", GetName(targetid), amount); SendClientMessage(playerid, COLOR_RED, buf); return 1; }
Код:
CMD<AD1>:sarm(cmdid, playerid, params[]) { new targetid, amount; if(sscanf(params, "ui", targetid, amount)) return SendClientMessage(playerid, COLOR_RED, "[USAGE]: /sarm [playerid] [amount]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, NOPLAYER); if(LoggedIn[targetid] != true) return SendClientMessage(playerid, COLOR_RED, NOTLOGGEDIN); SetPlayerArmour(targetid, amount); new buf[150]; format(buf, sizeof(buf), "You have set %s's armour to %d.", GetName(targetid), amount); SendClientMessage(playerid, COLOR_RED, buf); return 1; }