11.06.2016, 18:21
Hey everyone, I have the latest SA-MP package & latest sscanf package (from https://sampforum.blast.hk/showthread.php?tid=602923) but I'm still experiencing id bugs! I don't know why, the commands should be working properly..
Sometimes id 0 bug, sometimes id 2 bug. I don't get it why... so annoying.
Here's one of my command.
I've tried "u" but its still the same.
Sometimes id 0 bug, sometimes id 2 bug. I don't get it why... so annoying.
Here's one of my command.
PHP код:
CMD:pm(playerid, params[])
{
new str[128], text[128], targetid;
if(sscanf(params, "rs[128]", targetid, text)) return SendClientMessage(playerid, -1, "{8EB2D6}SERVER:{FFFFFF} /pm [player] [text]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "{8EB2D6}SERVER:{FFFFFF} Player isn't connected!");
format(str, sizeof(str), "PM to %s (%d): %s", GetName(targetid), targetid, text);
SendClientMessage(playerid, 0xE0E800FF, str);
format(str, sizeof(str), "PM from %s (%d): %s", GetName(playerid), playerid, text);
SendClientMessage(targetid, 0xE8C900FF, str);
return true;
}