12.03.2011, 12:34
yes iam using sscanf but look at this cmd ZCMD
problem is that params has pid whick is the slapped player idk how to make the slapped player id cant be removed and the reason optional please help
YES IAM USING SSCANF
no other old shit plz
Код:
CMD:slap(playerid, params[]) { if(sscanf(params, "us[128]", pid, creason)) return SendClientMessage(playerid, Grey, "Usage:/slap <id> <reason>"); else { GetPlayerPos(pid, X, Y, Z); SetPlayerPos(pid, X, Y, Z+6); new Float:Health; GetPlayerHealth(pid,Health); SetPlayerHealth(pid,Health-20); PlayerPlaySound(playerid,1190,0.0,0.0,0.0); PlayerPlaySound(pid,1190,0.0,0.0,0.0); GetPlayerName(playerid, pname, 24); GetPlayerName(pid, gname, 24); format(sc, sizeof(sc), "AdmCmd:%s(%d) Was slapped by admin %s reason: %s", gname, pid, pname, creason); SendClientMessageToAll(Red, sc); } return 1; }
YES IAM USING SSCANF
no other old shit plz
![Cheesy](images/smilies/biggrin.png)