Those are the parts including the textdraw :
OnplayerConnect :
Код:
public OnPlayerConnect(playerid)
{
gPlayerUsingLoopingAnim[playerid] = 0;
gPlayerAnimLibsPreloaded[playerid] = 0;
dini_Create("entered.txt");
TextDrawShowForPlayer(playerid,Textdraw2);
reply[playerid] = 0;
SendClientMessage(playerid,0xFF0000AA,"Air Combat By Etch");
SendClientMessage(playerid,0xFF0000AA,"[W E L C O M E]");
GameTextForPlayer(playerid,"~w~~y~SA-MP: ~r~Air ~g~Combat",5000,5);
SendPlayerFormattedText(playerid, "Welcome To Air Combat, If Your Are New type /help.", 0);
//SendClientMessageToAll(COLOR_GREY,string);
gActivePlayers[playerid]++;
gLastGaveCash[playerid] = GetTickCount();
TextDrawShowForPlayer(playerid,Textdraw2);
return 1;
}
OnPlayerSpawn:
Код:
public OnPlayerSpawn(playerid)
{
if(!gPlayerAnimLibsPreloaded[playerid]) {
PreloadAnimLib(playerid,"BOMBER");
PreloadAnimLib(playerid,"RAPPING");
PreloadAnimLib(playerid,"SHOP");
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"SMOKING");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"ON_LOOKERS");
PreloadAnimLib(playerid,"DEALER");
PreloadAnimLib(playerid,"CRACK");
PreloadAnimLib(playerid,"CARRY");
PreloadAnimLib(playerid,"COP_AMBIENT");
PreloadAnimLib(playerid,"PARK");
PreloadAnimLib(playerid,"INT_HOUSE");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"PED");
gPlayerAnimLibsPreloaded[playerid] = 1;
}
TextDrawShowForPlayer(playerid,Textdraw2);
if(gTeam[playerid] == TEAM_LS)
{
SetPlayerColor(playerid,COLOR_GREEN);
}
else
{
if(gTeam[playerid] == TEAM_LV)
{
SetPlayerColor(playerid,COLOR_YELLOW);
}
}
return 1;
}
OnGameModeInit:
Код:
public OnGameModeInit()
{
Textdraw2 = TextDrawCreate(11.000000,273.000000,"Los Santos: 0 ~n~~n~~y~Las Venturas: 0");
TextDrawAlignment(Textdraw2,0);
TextDrawBackgroundColor(Textdraw2,0x000000ff);
TextDrawFont(Textdraw2,1);
TextDrawLetterSize(Textdraw2,0.699999,1.600000);
TextDrawColor(Textdraw2,0x00ff0099);
TextDrawSetOutline(Textdraw2,1);
TextDrawSetProportional(Textdraw2,1);
TextDrawSetShadow(Textdraw2,1);
return 1;
}
OnPlayerDeath:
Код:
public OnPlayerDeath(playerid,killerid,reason)
{
if(gTeam[playerid]==TEAM_LS)
{
lvscore++;
}else{
lsscore++;
}
new tmpstr[50];
format(tmpstr,sizeof(tmpstr),"Los Santos: %d ~n~~n~~y~Las Venturas: %d",lsscore,lvscore);
TextDrawSetString(Textdraw2,tmpstr);
if(lsscore == 10) {
SendRconCommand("gmx");
GameTextForAll("~g~Los Santos Won The Round!!", 2500,5);
}
else if(lvscore == 10) {
SendRconCommand("gmx");
GameTextForAll("~y~Las Venturas Won The Round!!", 2500,5);
}
return 1;
}