Little help here please.
#1

Hello All,

I want to create something like if i will kill someone i will get a message: "%s[playerid] has killed %s[giveplayerid] with a %s[weapon], %d withesses" i dont know how to create the distange betwert [giveplayerid] near to him, example if i will kill someone with m4 i will get a message: "Kinto has killed TestName with a M4, %d withesses" i dont know how to create the %d withesses, can someone help me please to create the withesses fuction please?
Reply
#2

please help i need this
Reply
#3

Use

IsPlayerInRangeOfPoint
Reply
#4

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
Use

IsPlayerInRangeOfPoint
I want the withsess if they are near the dead player... not point
Reply
#5

Quote:
Originally Posted by Kinto
Посмотреть сообщение
I want the withsess if they are near the dead player... not point
Yes...

lrn2useit

You can use it to calculate the dead persons' position.
Reply
#6

Ok i got this with the IsPlayerInRangeOf but can you tell me how i can make it so i will know how much withess was near to him , like: 5 withesses, can you post me a example please?
Reply
#7

Quote:
Originally Posted by Kinto
Посмотреть сообщение
Код:
GetPlayerPos(playerid, x, y, z);

if(IsPlayerInRangeOfPoint(i, 5.0, x, y, z))
{
    format(string,128,"%s killed %s with a %s, %d withesses.",killer,name,weapname,withess);
}
Ok i got it thanks
Else if?
Reply
#8

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
Use

IsPlayerInRangeOfPoint
Quote:
Originally Posted by funky1234
Посмотреть сообщение
Else if?
my mistake sorry.
Reply
#9

can someone help me pleaes?
Reply
#10

Learn the freaking rules:
https://sampforum.blast.hk/showthread.php?tid=45235



Did you even bother to read "READ BEFORE POSTING" STICKIED topic?


pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new string[51], giveplayerid, giveplayer[MAX_PLAYER_NAME], playername[MAX_PLAYER_NAME], killerplayer[MAX_PLAYER_NAME];
GetPlayerPos(playerid, x, y, z);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerName(killerid, killerplayer, sizeof(killerplayer));
       if(IsPlayerInRangeOfPoint(giveplayerid, 5.0, x, y, z))
       {
       format(string, sizeof(string),"%s got killed by %s. Witness: %s", playername, killerplayer, giveplayer);
       SendClientMessageToAll(COLOR_WHITE, string);
       }
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)