09.05.2011, 14:31
I want to do when someone connects as written "Name has connected!" indicates that "Name" is TEAM_POLICE example and from there once in TEAM_POLICE to his name written in blue
Код:
public OnPlayerConnect(playerid) { new string[64], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,MAX_PLAYER_NAME); format(string,sizeof string,"%s has connected!",pName); SendClientMessageToAll(COLOR_WHITE,string); ResetStats(playerid); //police BigEar[playerid] = 0; OnDuty[playerid] = 0; JailPrice[playerid] = 0; //MAP ICONS SetPlayerMapIcon(playerid, 0, 2491.7500, -1668.5718, 13.3438, 62, -1); //GROVE SetPlayerMapIcon(playerid, 1, 293.2293, -1164.1016, 80.9099, 61, -1); //CRIPZ SetPlayerMapIcon(playerid, 2, 691.3636, -1276.0859, 13.5606, 23, -1); // SetPlayerMapIcon(playerid, 3, 725.6757,-1450.5458,17.6953, 13, -1); SetPlayerMapIcon(playerid, 4, 1122.7120, -2036.8850, 69.8942, 58, -1); SetPlayerMapIcon(playerid, 5, 1554.7040, -1677.0045, 16.1953, 30, -1); SetPlayerMapIcon(playerid, 6, 1278.5568, -805.3265, 86.1230, 43, -1); SetPlayerMapIcon(playerid, 7, 1693.4094, -1515.3542, 13.5534, 59, -1); // format(string, sizeof(string), "%s.ini", PlayerName(playerid)); if(!dini_Exists(string)) { gPlayerAccount[playerid] = 0; new regstring[256]; new regname[64]; SendClientMessage(playerid, COLOR_YELLOW, "?? ????? ??????. ????, ??????????? ???? ??????."); GetPlayerName(playerid,regname,sizeof(regname)); format(regstring,sizeof(regstring),"[B-U-L-G-A-R-I-A-N][S-E-R-V-E-R][0.3]\n???? ??????????? ???? ?????? ????? ?? ?? ??????"); ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"???????????:",regstring,"???????????","?????"); return 1; } else { gPlayerAccount[playerid] = 1; new loginstring[256]; new loginname[64]; SendClientMessage(playerid, COLOR_YELLOW, "SERVER: ???? ??? ? ????????????."); SendClientMessage(playerid, COLOR_WHITE, "HINT: ?? ???? ?? ?? ?????? ???? ?? ??????? ????????"); GetPlayerName(playerid,loginname,sizeof(loginname)); format(loginstring,sizeof(loginstring),"[B-U-L-G-A-R-I-A-N][S-E-R-V-E-R][0.3]\n????? ? ????????????. ????, ?????? ?????? ??????"); ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"???????:",loginstring,"????","?????"); return 1; } return 1; }