SA-MP Forums Archive
help in /rape cmd - 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)
+--- Thread: help in /rape cmd (/showthread.php?tid=469887)



Deleted. - iFiras - 15.10.2013

Deleted.


Re: help in /rape cmd - doreto - 15.10.2013

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


Deleted. - iFiras - 15.10.2013

Deleted.


Deleted. - iFiras - 15.10.2013

Deleted.


Re: help in /rape cmd - Anak - 15.10.2013

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

//



Re: help in /rape cmd - edzis84 - 15.10.2013

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


Deleted. - iFiras - 15.10.2013

Deleted.


Re: help in /rape cmd - Anak - 15.10.2013

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
       }



Deleted. - iFiras - 15.10.2013

Deleted.


Re: help in /rape cmd - Anak - 16.10.2013

np