• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] How i can add this to my command?
#1
How can I make sure that only the players who are in my virtual world can read the message that I send, and that those who are not in my virtual world do not read the message?



Code:
CMD:gl(playerid, params[])

{

? ? new Text[132], string[128], PlayerName[MAX_PLAYER_NAME];



? ? if(sscanf(params, "s[132]", Text))

? ? {

? ? ? ? SendClientMessage(playerid, -1, "{D41818}[COMANDO]{AFAFAF} /gl <texto>");

? ? }

? ? else

? ? {

? ? ? ? GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); // storing player name first in the PlayerName variable



? ? ? ? format(string, sizeof(string), "[ID:%d - %s]: %s",playerid, PlayerName, Text); //[ID:12 - Sebasti?n Price] texto

? ? ? ? SendClientMessageToAll(0xFFFFFF00, string);

? ? }



? ? return 1;

}
  Reply


Messages In This Thread
How i can add this to my command? - by Nicolas_Belic - 2021-02-19, 02:49 PM

Forum Jump: