Make /kill Command [Rep +1]
#1

Can someone make this script for me?

Script : example My name is Michael and I used /kill then he's health will set to 0 and a clientmessage will send to all players that : Michael has Commited a Sucide .

can someone plz ? plz plz
Reply
#2

pawn Код:
stock PlayerName(i)// PlayerName(playerid) that you will use it if you wonna
{
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(i,pname,MAX_PLAYER_NAME);
    return pname;
}




CMD:kill(playerid,params[])
{
    SetPlayerHealth(playerid,-1);
    new string[50];
    format(string,sizeof(string),"%s has Commited a Sucide.",PlayerName(playerid)); // if you have your own getplayername stock change PlayerName(playerid) wich your!!
    SendClientMessageToAll(-1,string);
    return true;
}
If I have helped you click on
Reply
#3

Quote:
Originally Posted by doreto
Посмотреть сообщение
pawn Код:
stock PlayerName(i)// PlayerName(playerid) that you will use it if you wonna
{
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(i,pname,MAX_PLAYER_NAME);
    return pname;
}




CMD:kill(playerid,params[])
{
    SetPlayerHealth(playerid,-1);
    new string[50];
    format(string,sizeof(string),"%s has Commited a Sucide.",PlayerName(playerid)); // if you have your own getplayername stock change PlayerName(playerid) wich your!!
    SendClientMessageToAll(-1,string);
    return true;
}
If I have helped you click on
Tried but many error messages..
Reply
#4

erros were are you sure its not from you when i compile it dint give me did you add the stock or did you have another cmd colled kill + this is done wich ZCMD include if you dont #include <ZCMD> it wont work

EDIT:if you are wich defoult processor use this but ZCMD if much faster + its 100% working next time dont say its give you errror
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
}

#endif

stock PlayerName(i)
{
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(i,pname,MAX_PLAYER_NAME);
    return pname;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/kill", cmdtext, true, 4) == 0)
    {
        SetPlayerHealth(playerid,-1);
        new string[50];
        format(string,sizeof(string),"%s has Commited a Sucide.",PlayerName(playerid));
        SendClientMessageToAll(-1,string);
        return 1;
    }
    return 0;
}
If I have helped you click on
Reply
#5

Well Nevermind It was my mistake ... sry

Anyway Thanks for helping YOUR CODE ROX :P

Rep +1 for you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)