GameTextForPlayer help please
#1

Hi, I have made this code:

PHP код:
        new admin;
        {
        
admin = :P_LEVEL_HELPER;
        
GameTextForPlayeradmin"~r~New Report"50003);
        } 
I am testing with a friend but my friend did not appear the message, why?
Reply
#2

I really intrigued with this, did it actually compile for you?
Reply
#3

Код:
GameTextForPlayer( :P_LEVEL_HELPER, "~r~New Report", 5000, 3);
The same, my friend can't see the text
Reply
#4

Yes, and compiled. As I do?
Reply
#5

I honestly don't know how it's compiling, as said above, it's not valid syntax. I'd advise you to actually look at some tutorials to see how the syntax works.

Anywho, shouldn't it be this?
pawn Код:
new admin;
        {
        admin = :P_LEVEL_HELPER;
        GameTextForPlayer( playerid, "~r~New Report", 5000, 3);
        }
Reply
#6

Quote:
Originally Posted by Luis-
Посмотреть сообщение
I honestly don't know how it's compiling, as said above, it's not valid syntax. I'd advise you to actually look at some tutorials to see how the syntax works.

Anywho, shouldn't it be this?
pawn Код:
new admin;
        {
        admin = :P_LEVEL_HELPER;
        GameTextForPlayer( playerid, "~r~New Report", 5000, 3);
        }
code that sends the text to the player reports
Reply
#7

Well, it only complies if you remove the two points.

Reply
#8



compiled
Reply
#9

Now can you tell me if it's the right way?
Reply
#10

Quote:
Originally Posted by Guss
Посмотреть сообщение
Now can you tell me if it's the right way?
It isn't right, where did you even get that?

If you want to send a game text to the server helpers, then loop through the players. Even if you code worked, it would send the game text to only one player. Example:
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i ++)
{
    if(aUserInfo[i][user_admin_level] => P_LEVEL_HELPER)
    {
        GameTextForPlayer(i, "~r~New Report", 5000, 3);
    }
}
* Note that, that isn't a copy/paste code, it's only an example.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)