Posts: 220
Threads: 54
Joined: Jan 2014
Hello.
I do a cmd /apm (administrative command to send a pm to a player).
/apm <id> <text>
Then, when the administrator sends private message, the player can respond with:
/rpm <text>
However, I want to know how to save the id of the player who sent the pm to meet him without putting the id in the /rpm.
thx
Posts: 220
Threads: 54
Joined: Jan 2014
Posts: 220
Threads: 54
Joined: Jan 2014
I want to save the id of the person who sent the private message to place an order:
/rpm <text>
This way, no need to put the id, send it directly to the right person!
Posts: 220
Threads: 54
Joined: Jan 2014
How do I remove the fact of entering the id, because the command works but I do /rmp <id> <text>, and I want /rmp <text>
pawn Код:
if(strcmp(cmd, "/reptick", true) == 0)
{
if(RepTICK[playerid] != 1) return SendClientMessage(playerid, COLOR_SERVER, "Aucun modйrateur/administrateur ne vous a envoyй de /tick.");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, -1, "Commande: {E0E0E0}/reptick <texte>");
giveplayerid = ReturnUser(tmp);
if(!player_isValid(pLastPmAuthor[playerid])) return SendClientMessage(playerid, COLOR_SERVER, noConnected);
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' ')) idx++;
new offset = idx;
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result)) return SendClientMessage(playerid, -1, "Commande: {E0E0E0}/reptick <texte>");
format(string, sizeof(string), "Rйponse du /tick de %d/%s: %s", playerid, playername, result);
SendClientMessage(pLastPmAuthor[playerid], 0xFFFF00AA, string);
format(string, sizeof(string), "Rйponse envoyйe а %d/%s: %s", giveplayerid, giveplayer, result);
RepTICK[giveplayerid] = 0; // On lui retire l'autorisation de /reptick
SendClientMessage(playerid, 0xFFFF00AA, string);
printf("LOGS /reptick. Ticket de %s а %s: %s", playername, giveplayer, result);
return 1;
}
Posts: 220
Threads: 54
Joined: Jan 2014