/kill cmd
#5

[/CODE]
Quote:
Originally Posted by Jaua10
Посмотреть сообщение
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 код:
if (strcmp("/kill"cmdtexttrue10) == 0)
    {
        if (
IsPlayerConnected(playerid))
        {
        
SendClientMessage(playerid0xFF8282AA"You lost $1,000 to pay for your antidepressants.");
        
SendClientMessage(playerid0xFF8282AA"Before you are discharged, Hospital staff will confiscate your weapons.");
        
GivePlayerMoney(playerid, -1000);
        
SetPlayerHealth(playerid,0);
        }
        return 
1;
    } 
I dont know if i have to keep coding with this type of cmd o start to use zcmd.

Use : this script and make sure to use the needed includes . . . like "ZCMD ..." and add these colors
PHP код:
CMD:CommandToKill(playerid)//Use any command, as you said /kill
{
 If(
Playerinfo[playerid][pInjured] != 0) return SendClientMessage(playeridCOLOR_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.
  }

Quote:

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.");

I suggest you adding this things when spawning on the hospital, OnPlayerSpawn ...
Reply


Messages In This Thread
/kill cmd - by Jaua10 - 29.05.2018, 03:36
Re: /kill cmd - by Sew_Sumi - 29.05.2018, 03:40
Re: /kill cmd - by UFF - 29.05.2018, 03:46
Re: /kill cmd - by Sew_Sumi - 29.05.2018, 06:26
Re: /kill cmd - by DALii - 29.05.2018, 10:33
Re: /kill cmd - by Sew_Sumi - 29.05.2018, 10:49

Forum Jump:


Users browsing this thread: 1 Guest(s)