SA-MP Forums Archive
CMD:sendtoooc [playerid] - 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: CMD:sendtoooc [playerid] (/showthread.php?tid=467763)



CMD:sendtoooc [playerid] - DamonD - 04.10.2013

Removed, please delete the thread.


Re: CMD:sendtoooc [playerid] - ejb - 04.10.2013

Here's a way you could do it, just modify it to your needs:


pawn Код:
new InJail[MAX_PLAYERS];

CMD:sendtoooc(playerid, params[])
{
    new targetid;
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "Usage: /sendtoooc (name/id)");
    if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "player is not connected.");
    if(InJail[targetid] == 1)
    {
        SetPlayerPos(targetid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]);
    }
    else
    {
        SendClientMessage(playerid, -1, "Player is not in jail.");
    }
    return 1;
}