if (strcmp("/kill", cmdtext, true, 10) == 0)
{
if (IsPlayerConnected(playerid))
{
SendClientMessage(playerid, 0xFF8282AA, "You lost $1,000 to pay for your antidepressants.");
SendClientMessage(playerid, 0xFF8282AA, "Before you are discharged, Hospital staff will confiscate your weapons.");
GivePlayerMoney(playerid, -1000);
SetPlayerHealth(playerid,0);
}
return 1;
}
CMD:kill(playerid)
{
SetPlayerHealth(playerid, 0);
return 1;
}
CMD:kill(playerid) { SendClientMessage(playerid, 0xFF8282AA, "You lost $1,000 to pay for your antidepressants."); SendClientMessage(playerid, 0xFF8282AA, "Before you are discharged, Hospital staff will confiscate your weapons."); GivePlayerMoney(playerid, -1000); SetPlayerHealth(playerid,0); return 1; }
Hellos guys today i'm trying to start a gm from 0 but with zcmd, someone can give me a help how can i change this cmd to zcmd:
PHP код:
|
CMD:CommandToKill(playerid)//Use any command, as you said /kill
{
If(Playerinfo[playerid][pInjured] != 0) return SendClientMessage(playerid, COLOR_GREY, "You're not able to kill yourself while injured); // Use it just if he's injured and you can add more things ... like paintball or whatever.
else
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_WHITE, "You have killed your self . . .");
//Then add the nearby Purple text if you want to.
}
}
SendClientMessage(playerid, 0xFF8282AA, "You lost $1,000 to pay for your antidepressants."); SendClientMessage(playerid, 0xFF8282AA, "Before you are discharged, Hospital staff will confiscate your weapons."); |