17.09.2009, 17:28
Okay guys
This is my code for now. Iґve been thinking about improoving it, which Iґd like to do now. I want the playerґs team displayed instead of "Global Chat".
Teams are like this (I want to use the playerґs color for it)
Germany == 0xAFAFAFAA
USA == 0x15005EFF
China == 0x90FF87FF
Russia == 0xB8860BAA
How can this be done?
Код:
if(!strcmp(cmd, "/g", true)) { if(!globalchat) return SendClientMessage(playerid,RED,"Global chat is not currently enabled."); while(cmdtext[idx] == 32) idx++; if(cmdtext[idx] == EOS) return SendClientMessage(playerid,RED,"Usage: /g [text]"); new string[128]; GetPlayerName(playerid,string,MAX_PLAYER_NAME); format(string,128,"[Global Chat]-%s: %s",string,cmdtext[idx]); return SendClientMessageToAll(COLOR_GREEN,string); }
Teams are like this (I want to use the playerґs color for it)
Germany == 0xAFAFAFAA
USA == 0x15005EFF
China == 0x90FF87FF
Russia == 0xB8860BAA
How can this be done?