this code is extracted from the revoke sprx is implemented in my menu but I have no idea how it works if someone knows comment, thanks
Quote:Code:void giveCMDMenuToPlayer(Player PlayerIndex, bool Toggle)
{
if (Toggle)
{
int msgType = Read_Global(12767);
switch (msgType)
{
case 3:
char nameOfSenderMessage[255];
char nameOfSender[255];
char nameOfPlayer[255];
snprintf(nameOfSenderMessage, sizeof(nameOfSenderMessage), "%s", Read_Global_Char(101656));
snprintf(nameOfSender, sizeof(nameOfSender), "%s", Read_Global_Char(2375));
int player = iNameToID(nameOfSender);
snprintf(nameOfPlayer, sizeof(nameOfPlayer), "%s", GET_PLAYER_NAME(player));
printf("Player: %s \nMessage: %s\nID: %i\Name ID: %s\n", nameOfSender, nameOfSenderMessage, player, nameOfPlayer);
if (strstr(nameOfSenderMessage, "help"))
{
sendPlayerMessageCMD(PlayerIndex, "");
}
if (strstr(nameOfSenderMessage, "guns"))
{
sendPlayerMessageCMD(PlayerIndex, "~r~Weapons Given");
}
Write_Global(12767, 0);
break;
}
}
}
drawNotification("Welcome to Royale 2.5, Created by SxsxModz");
C++/C# Dev
Gsc/r Dev