gametext report
#1

is there a way to make a gametext report for admins? if yes can you help me?
Код:
	GameTextForPlayer(Admin, "%s(ID:%d) has reported ~n~%s(ID:%d) ~n~reason %s.", 5000, 5, GetName(playerid), playerid, GetName(id), id, reason);
Reply
#2

https://sampwiki.blast.hk/wiki/Format
Reply
#3

Sure there is

You need to format the message first and than send it to the players you want (also the admins)
pawn Код:
new
    string[128]
;
format(string, sizeof string, "text", ...);

for(new i; i < MAX_PLAYERS; ++i) {
    if(IsPlayerAdmin(i)) { // Replace that will your admin variable
        GameTextForPlayer(i, string, 5000, 4);
    }
}
Reply
#4

pawn Код:
new string[128];
format(string, 128, "%s(ID:%d) has reported ~n~%s(ID:%d) ~n~reason %s.", GetName(playerid), playerid, GetName(id), id, reason)
for(new i; i < MAX_PLAYERS; ++i) {
    if(IsPlayerAdmin(i)) {
        GameTextForPlayer(i, string, 5000, 5);
    }
}
rep me plz if i helped you
Reply
#5

Quote:
Originally Posted by simo0000
Посмотреть сообщение
pawn Код:
new string[128];
format(string, 128, "%s(ID:%d) has reported ~n~%s(ID:%d) ~n~reason %s.", GetName(playerid), playerid, GetName(id), id, reason)
for(new i; i < MAX_PLAYERS; ++i) {
    if(IsPlayerAdmin(i)) {
        GameTextForPlayer(i, string, 5000, 5);
    }
}
rep me plz if i helped you
Change :
PHP код:
GetName 
To
PHP код:
GetPlayerName 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)