help in /rape cmd
#1

Deleted.
Reply
#2

http://forum.sa-mp.com/announcement.php?f=12
Reply
#3

Deleted.
Reply
#4

Deleted.
Reply
#5

I use some sort of this in my server...

pawn Код:
stock GetClosestPlayer(playerid)
{
    new Float:cdist, targetid = -1;
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i) && GetPlayerState(i) != PLAYER_STATE_SPECTATING && playerid != i && (targetid < 0 || cdist > GetDistanceBetweenPlayers(playerid, i)))
        {
            targetid = i;
            cdist = GetDistanceBetweenPlayers(playerid, i);
        }
    }
    return targetid;
}

//
new Tplayer = GetClosestPlayer(playerid);// use this in command

//
Reply
#6

Not sure if its even possible, why don't you make sscanf command instead of this?
Reply
#7

Deleted.
Reply
#8

Quote:
Originally Posted by iFiras
Посмотреть сообщение
Hey guys, Please anyone can give me a /rape command like when you be near a player you do /rape you rape the player, doing /rape without specifing ID of player. I need this command for my CNR server
I have been using this system in my servers since two years... it's possible.
Sure that in command to get closed player id you can use specific distance like:

pawn Код:
GetPlayerPos(playerid,x,y,z);
       if(IsPlayerInRangeOfPoint(Tplayer,6.0,x,y,z)){
       SendClientMessage(Tplayer, COLOR_RED,"You have been raped!"); //send message to Tplayer(target)
       SendClientMessage(playerid, COLOR_RED,"You have raped target player"); // send message to playerid (user)
       
       // code
       }else{
       SendClientMessage(playerid, COLOR_RED,"No one is close enough.");// similarly
       }
Reply
#9

Deleted.
Reply
#10

np
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)