Jump to content

Question

Posted

Am facut un fel de readcmd dar un mare fail..

Cand cumpara un player armura sau viata, adminilor trebuie sa le apara ceva de gen "% has bought health"

Deci, doar cand eu cumpar armura imi arata chestia de mai sus. la alti playeri nu arata. Plus imi da spam la tot chatul

5jwu1u.png

Comanda

new string[128]; new name[MAX_PLAYER_NAME+1];

GetPlayerName(playerid, name, sizeof(name));

for(new i=0; i<MAX_PLAYERS; i++)

{

if(IsPlayerAdmin(playerid))

{

format(string, sizeof(string), "[Admin Logs] %s [%d] has bought an Armour Refill ($2000).", name, playerid);

SendClientMessage(playerid, COLOR_PURPLE, string); // Send's the format to the online Rcon'ly Logged in Admins.

}

}

cum sa-l fac frumos, sa mearga perfect pentru toti care cumpara armura si fara spam?

3 answers to this question

Recommended Posts

Posted

Sterge "%s has bought health" sa ramana asa "".La fel faci si la armura.

Iar daca doresti sa o faci comanda incearca asta si revino cu un raspuns

[pawn]new string[128]; new name[MAX_PLAYER_NAME+1];

GetPlayerName(playerid, name, sizeof(name));

for(new =0; 0<MAX_PLAYERS; i++)

{

if(IsPlayerAdmin(playerid))

{

format(string, sizeof(string), "[Admin Logs] %s [%d] has bought an Armour Refill ($2000).", name, playerid);

SendClientMessage(playerid, COLOR_PURPLE, string); // Send's the format to the online Rcon'ly Logged in Admins.

}

}[/pawn]

 

 

Posted

[quote name="Adrian_Petre" post="149886" timestamp="1378254702"]
Sterge "%s has bought health" sa ramana asa "".La fel faci si la armura.
Iar daca doresti sa o faci comanda incearca asta si revino cu un raspuns
[pawn]new string[128]; new name[MAX_PLAYER_NAME+1];
 GetPlayerName(playerid, name, sizeof(name));
 for(new =0; 0<MAX_PLAYERS; i++)
 {
 if(IsPlayerAdmin(playerid))
 {
 format(string, sizeof(string), "[Admin Logs] %s [%d] has bought an Armour Refill ($2000).", name, playerid);
 SendClientMessage(playerid, COLOR_PURPLE, string); // Send's the format to the online Rcon'ly Logged in Admins.
 }
 }[/pawn]
[/quote]

Nu are ce sa stearga, trebuie sa modifice 2 chestii

new string[128]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); for(new i=0; i<MAX_PLAYERS; i++) {     if(IsPlayerAdmin(i))     {         format(string, sizeof(string), "[Admin Logs] %s [%d] has bought an Armour Refill ($2000).", name, playerid);         SendClientMessage(i, COLOR_PURPLE, string); // Send's the format to the online Rcon'ly Logged in Admins.     } }

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.