How To Make /r (Reply PM Command) ZCMD +rep
#4

pawn Код:
new lastSender[MAX_PLAYERS] = {INVALID_PLAYER_ID, ...};

CMD:pm(playerid, params[])
{
    //Add this at the end:
    lastSender[id] = playerid;
    return 1;
}

CMD:r(playerid, params[])
{
    new send_to = lastSender[playerid];
   
    //Now just send the pm to 'send_to'
    return 1;
}
Also make sure you put INVALID_PLAYER_ID in lastSender in OnPlayerConnect so it won't pass the id to a new player who joins
Reply


Messages In This Thread
How To Make /r (Reply PM Command) ZCMD +rep - by TitanEVG - 18.09.2015, 16:38
Re: How To Make /r (Reply PM Command) ZCMD +rep - by Sellize - 18.09.2015, 16:39
Re: How To Make /r (Reply PM Command) ZCMD +rep - by TitanEVG - 18.09.2015, 16:48
Re: How To Make /r (Reply PM Command) ZCMD +rep - by [XST]O_x - 18.09.2015, 16:58

Forum Jump:


Users browsing this thread: 1 Guest(s)