Admin On Duty command help
#2

Quote:
Originally Posted by darkknight123
Посмотреть сообщение
im trying to script a /aod command Amin On Duty this is what i got

it complies fine but when i get in game and test it the server crashes :/ i think its because of the sendclientmessage toall because im wanting to to say the players name witch is %s but server crahes IDK what i did wrong please help
This won't work:
Код:
SendClientMessageToAll(0x33CCFFAA," %s Is now a off duty Admin");
If you wanna get a player's name in string, use it with 'format':
pawn Код:
new string[64], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), " %s Is now a off duty Admin", name);
SendClientMessageToAll(0x33CCFFAA, string);
And 1 more thing: use colors in defined form, easier to use them:
pawn Код:
#define your_color 0x33CCFFAA
Hope I could help you
Reply


Messages In This Thread
Admin On Duty command help - by darkknight123 - 12.01.2011, 14:12
Re: Admin On Duty command help - by Nonameman - 12.01.2011, 14:20
Re: Admin On Duty command help - by darkknight123 - 12.01.2011, 14:59

Forum Jump:


Users browsing this thread: 1 Guest(s)