05.08.2009, 18:07
Simple example using dcmd and sscanf, a great combination for making commands 
Hope that helps.
Note, you will need to define certain things to make this work with your script, this is merely an example to get you started

pawn Код:
dcmd_heal(playerid,params[])
{
if(sscanf(params,"i",strval(params))) SendClientMessage(playerid,red,"Usage: /heal <playerid>");
else
{
if(!IsPlayerConnected(strval(params))) return SendClientMessage(playerid,red,"Error, player not found!");
SetPlayerHealth(strval(params),100);
format(string,sizeof(string),"You have been healed by %s",PlayerName(strval(params)));
SendClientMessage(strval(params),red,string);
}
return 1;
}
Note, you will need to define certain things to make this work with your script, this is merely an example to get you started

