SA-MP Forums Archive
/kill - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /kill (/showthread.php?tid=165031)



/kill - Luis_Leone - 03.08.2010

I made a /kill command, but i wanna do it like this "User_Name Has Died" if you can edit it to say these "Died" "Drowned" "Fists" Thank you, here's the cmd,

pawn Код:
dcmd_kill(playerid, params[])
{
    #pragma unused params
    SetPlayerHealth(playerid, 0);
    SendClientMessageToAll(COLOR_RED, "%s Has Died");
    return 1;
}
pawn Код:
dcmd(kill, 4, cmdtext);



Re: /kill - Kitten - 03.08.2010

try adding

Код:
	new string[64], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s Has Died",pName);
    SendClientMessageToAll(0xFFFFFFAA,string);



Re: /kill - Luis_Leone - 03.08.2010

Quote:
Originally Posted by Kitten
Посмотреть сообщение
try adding

Код:
	new string[64], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s Has Died",pName);
    SendClientMessageToAll(0xFFFFFFAA,string);
Thanks dude, Now how can i make it say it when a player gets ran over or shot or whatever else?


Re: /kill - Kitten - 03.08.2010

Код:
public OnVehicleDeath(vehicleid, killerid)
{
	new string[64], pName[MAX_PLAYER_NAME];
 	GetPlayerName(vehicleid,pName,MAX_PLAYER_NAME);
 	format(string,sizeof string,"%s Has Died and got Ran Over",pName);
 	SendClientMessageToAll(0xFFFFFFAA,string);
	return 1;
}
Im not sure atleast try....


Re: /kill - willsuckformoney - 03.08.2010

pawn Код:
// at top

new aWeaponNames[][32] = {
    {"Unarmed (Fist)"}, // 0
    {"Brass Knuckles"}, // 1
    {"Golf Club"}, // 2
    {"Night Stick"}, // 3
    {"Knife"}, // 4
    {"Baseball Bat"}, // 5
    {"Shovel"}, // 6
    {"Pool Cue"}, // 7
    {"Katana"}, // 8
    {"Chainsaw"}, // 9
    {"Purple Dildo"}, // 10
    {"Big White Vibrator"}, // 11
    {"Medium White Vibrator"}, // 12
    {"Small White Vibrator"}, // 13
    {"Flowers"}, // 14
    {"Cane"}, // 15
    {"Grenade"}, // 16
    {"Teargas"}, // 17
    {"Molotov"}, // 18
    {" "}, // 19
    {" "}, // 20
    {" "}, // 21
    {"Colt 45"}, // 22
    {"Colt 45 (Silenced)"}, // 23
    {"Desert Eagle"}, // 24
    {"Normal Shotgun"}, // 25
    {"Sawnoff Shotgun"}, // 26
    {"Combat Shotgun"}, // 27
    {"Micro Uzi (Mac 10)"}, // 28
    {"MP5"}, // 29
    {"AK47"}, // 30
    {"M4"}, // 31
    {"Tec9"}, // 32
    {"Country Rifle"}, // 33
    {"Sniper Rifle"}, // 34
    {"Rocket Launcher"}, // 35
    {"Heat-Seeking Rocket Launcher"}, // 36
    {"Flamethrower"}, // 37
    {"Minigun"}, // 38
    {"Satchel Charge"}, // 39
    {"Detonator"}, // 40
    {"Spray Can"}, // 41
    {"Fire Extinguisher"}, // 42
    {"Camera"}, // 43
    {"Night Vision Goggles"}, // 44
    {"Infrared Vision Goggles"}, // 45
    {"Parachute"}, // 46
    {"Fake Pistol"} // 47
};

//onplayerdeath

        GetPlayerName(playerid, playername, sizeof(playername));
    format(string, sizeof(string), "%s has died (%s)", playername, aWeaponNames[reason]);
    SendClientMessageToAll(0x00FF32FF, string);
        new string[50];
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));

thats it lol i forgot where i had it but i found it


Re: /kill - Kitten - 03.08.2010

that works perfect i tryed it