Rape help
#1

I have a /rape command, but i need to do /rape and the players ID, is there a way to do /rape so it rapes the closest player?
Reply
#2

pawn Код:
stock IsPlayerNearPlayer(playerid, targetid, Float:radius)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(targetid, x, y, z);
    if(IsPlayerInRangeOfPoint(playerid, radius ,x, y, z))
    {
        return 1;
    }
    return 0;
}
//but typically its just the playerid u want to the target and the distance
if( IsPlayerNearPlayer(playerid, targetid, 15))
Reply
#3

do i have to copy this and place it in my GM ?
Reply
#4

yeah.. put it anywhere in your gamemode, alongside with your other stocks.
Reply
#5

(461) : error 010: invalid function or declaration
Reply
#6

whats this error ? i got it from if( IsPlayerNearPlayer(playerid, targetid, 15))
Reply
#7

pawn Код:
if(IsPlayerNearPlayer(playerid, 5, 10.0))
{
your message
}
If you showed rape cmd maybe we could help you more!
Reply
#8

like this ?

pawn Код:
stock IsPlayerNearPlayer(playerid, targetid, Float:radius)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(targetid, x, y, z);
    if(IsPlayerInRangeOfPoint(playerid, radius ,x, y, z))
    {
        return 1;
    }
    return 0;
}
//but typically its just the playerid u want to the target and the distance
if(IsPlayerNearPlayer(playerid, 5, 10.0))
{
   SendClientMessage(playerid, COLOR_RED, "No Players Close Enough To Rape."
}
Reply
#9

Lol that function is needed to be under command! like

EXAMPLE:
pawn Код:
YCMD:rape(playerid,pramas[],help)
{
    Do your code here animes etc..
    if(IsPlayerNearPlayer(playerid, 5, 10.0))
    {
          SendClientMessage(playerid, COLOR_RED, "No Players Close Enough To Rape."
    }

}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)