14.06.2012, 12:09
So basically I want a message to come out when a player kills another player.(Most of it is from a mix of threads, but i cant get it to work , so here it goes (yeah Im quite a noob at scripting , its probably simple)
when someone gets killed , it says "has been killed with a sawn off"
basically i want it to be , for example "daastle (id) has been killed by don2 (id) with a sawn off .
any quit answers anyone? I am quite nooby and dont really understand like the last bit of it , but I would love to have this one
pd:and if It isnt asking for too much, I wanted to insert id into my heal cmd , and I want the clientmessagetoall to send the id too , not only the name (right now it says : "daastle has used /heal" , and I wanted it to be "daastle (id) has used heal)
Maybe Im asking for too much , but I dont understand most of the tutorials because most of them assume I know how what "define" is and stuff.
Thanks alot (if you wish to put a timer between heal and heal , please do It )
Sorry for all the questions :S
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
new weapname[50]; //brought it before the getplayer
new string[128]; //defined a string
GetWeaponName(GetPlayerWeapon(killerid),weapname, sizeof(weapname));
format(string,128,"%s has killed %s with a %s.",killerid,playerid,weapname);
SendClientMessageToAll(0x800000AA, string);
return 1;
}
basically i want it to be , for example "daastle (id) has been killed by don2 (id) with a sawn off .
any quit answers anyone? I am quite nooby and dont really understand like the last bit of it , but I would love to have this one
pd:and if It isnt asking for too much, I wanted to insert id into my heal cmd , and I want the clientmessagetoall to send the id too , not only the name (right now it says : "daastle has used /heal" , and I wanted it to be "daastle (id) has used heal)
pawn Код:
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
new name[24], string[56];
SetPlayerHealth(playerid, 100);
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s (%d) has used /heal", name, playerid);
SendClientMessageToAll(0xFF9900AA, string);
return 1;
}
Thanks alot (if you wish to put a timer between heal and heal , please do It )
Sorry for all the questions :S