21.02.2012, 10:52
Hello reader,
I didn't know how to explain it in the title so fast but I mean like someone types the command "/pm 0 test." and it should just show "test." at params, I am using ZCMD.
This is the code I'm using:
and it works as this:
in game.
Thank you in advance.
Best regards,
Jesse
I didn't know how to explain it in the title so fast but I mean like someone types the command "/pm 0 test." and it should just show "test." at params, I am using ZCMD.
This is the code I'm using:
pawn Код:
CMD:pm(playerid, params[])
{
if (isnull(params)) return SendClientMessage(playerid, KLEUR_VOORB, "USAGE: /pm [ID] [text]");
else if (strlen(params) >= 62) return SendClientMessage(playerid, KLEUR_VOORB, "You have exceeded the maximum command length, please use a shorter command.");
else
{
new pmontvang[110];
format(pmontvang, sizeof(pmontvang), "(( PM To %s [ %d ]: %s ))", pNaam(playerid), playerid, params);
SendClientMessage(senderid, KLEUR_PM, pmontvang);
new pmverstuur[110];
format(pmverstuur, sizeof(pmverstuur), "(( PM From %s [ %d ]: %s ))", pNaam(playerid), playerid, params);
SendClientMessage(playerid, KLEUR_PM, pmverstuur);
}
return 1;
}
in game.
Thank you in advance.
Best regards,
Jesse