09.01.2011, 15:29
Hey, I started scripted a while ago now and have forgot a few things... so I might fail a bit, like I did here.
I created a /die [reason] command, but the problem is, it doesn't show the reason. I'm using sscanf and dcmd.
If you know the problem, please reply thx
I created a /die [reason] command, but the problem is, it doesn't show the reason. I'm using sscanf and dcmd.
pawn Код:
dcmd_die(playerid,params[])
{
new string[128],reason[25],name[25];
if(sscanf(params,"u",playerid,reason)) SendClientMessage(playerid,red,"Usage: /die [reason]");
else
{
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"%s killed himself reason: %s",name,reason);
SendClientMessageToAll(white,string);
SetPlayerHealth(playerid,0);
}
return 1;
}