15.02.2012, 22:18
I added something to my Vortex Roleplay script, and onplayertext, I did the following:
But it still does a nearbymessage. Is there a way so it doesnt? Cause I cant seem to find out how.
PHP код:
if(Player[playerid][PMingID] >= 0)
{
format(string, sizeof(string), "[PM] to %s: %s", GetName(Player[playerid][PMingID]), text);
SendClientMessage(playerid, PLAYERCOM, string);
format(string, sizeof(string), "PM from %s (ID: %d): %s", GetName(playerid), playerid, text);
SendClientMessage(Player[playerid][PMingID], YELLOW, string);
}
if(! strcmp(text, "##", true))
{
if(Player[playerid][PMingID] >= 0)
{
format(string, sizeof(string), "You have stopped PMing %s", GetName(Player[playerid][PMingID]));
SendClientMessage(playerid, WHITE, string);
Player[playerid][PMingID] = -1;
}
else
{
SendClientMessage(playerid, WHITE, "You are not PMing anybody!");
}
}