Код:
public OnPlayerText(playerid, text[])
{
if (strcmp(text, "1", true) == 0)
{
if (IsInArmsJobCp[playerid] == 1)
{
TextDrawHideForPlayer(playerid,Text:Textdraw0);
TextDrawHideForPlayer(playerid,Text:Textdraw1);
TextDrawHideForPlayer(playerid,Text:Textdraw2);
TextDrawHideForPlayer(playerid,Text:Textdraw3);
TextDrawHideForPlayer(playerid,Text:Textdraw4);
TextDrawHideForPlayer(playerid,Text:Textdraw5);
TextDrawHideForPlayer(playerid,Text:Textdraw6);
TextDrawHideForPlayer(playerid,Text:Textdraw7);
TextDrawShowForPlayer(playerid,Textdraw8);
TextDrawShowForPlayer(playerid,Textdraw9);
TextDrawShowForPlayer(playerid,Textdraw10);
TextDrawShowForPlayer(playerid,Textdraw11);
TextDrawShowForPlayer(playerid,Textdraw12);
TextDrawShowForPlayer(playerid,Textdraw13);
TextDrawShowForPlayer(playerid,Textdraw14);
TextDrawShowForPlayer(playerid,Textdraw15);
TextDrawShowForPlayer(playerid,Textdraw16);
TextDrawShowForPlayer(playerid,Textdraw17);
TextDrawShowForPlayer(playerid,Textdraw18);
TextDrawShowForPlayer(playerid,Textdraw19);
TextDrawShowForPlayer(playerid,Textdraw20);
TextDrawShowForPlayer(playerid,Textdraw21);
return 0;
}
if(IsInCarShop[playerid] == 1)
{
if(GetPlayerMoney(playerid) >= 42999)
{
SendClientMessage(playerid,0xFF0000AA,"You Don't Have Enough Money To Buy This Vehicle!");
TogglePlayerControllable(playerid,1);
TextDrawHideForPlayer(playerid,Text:Textdraw22);
TextDrawHideForPlayer(playerid,Text:Textdraw23);
TextDrawHideForPlayer(playerid,Text:Textdraw24);
TextDrawHideForPlayer(playerid,Text:Textdraw25);
TextDrawHideForPlayer(playerid,Text:Textdraw26);
TextDrawHideForPlayer(playerid,Text:Textdraw27);
TextDrawHideForPlayer(playerid,Text:Textdraw28);
TextDrawHideForPlayer(playerid,Text:Textdraw29);
TextDrawHideForPlayer(playerid,Text:Textdraw30);
TextDrawHideForPlayer(playerid,Text:Textdraw31);
TextDrawHideForPlayer(playerid,Text:Textdraw32);
TextDrawHideForPlayer(playerid,Text:Textdraw33);
TextDrawHideForPlayer(playerid,Text:Textdraw34);
return 0;
}
if(GetPlayerMoney(playerid) >= 43000)
{
GivePlayerMoney(playerid,-43000);
TogglePlayerControllable(playerid,1);
IsAlreadyBuyedCar[playerid] = 1;
TextDrawHideForPlayer(playerid,Text:Textdraw22);
TextDrawHideForPlayer(playerid,Text:Textdraw23);
TextDrawHideForPlayer(playerid,Text:Textdraw24);
TextDrawHideForPlayer(playerid,Text:Textdraw25);
TextDrawHideForPlayer(playerid,Text:Textdraw26);
TextDrawHideForPlayer(playerid,Text:Textdraw27);
TextDrawHideForPlayer(playerid,Text:Textdraw28);
TextDrawHideForPlayer(playerid,Text:Textdraw29);
TextDrawHideForPlayer(playerid,Text:Textdraw30);
TextDrawHideForPlayer(playerid,Text:Textdraw31);
TextDrawHideForPlayer(playerid,Text:Textdraw32);
TextDrawHideForPlayer(playerid,Text:Textdraw33);
TextDrawHideForPlayer(playerid,Text:Textdraw34);
return 0;
}
}
Код:
if (strcmp(text, "2", true) == 0)
{
if (IsInArmsJobCp[playerid] == 1)
{
TextDrawHideForPlayer(playerid,Text:Textdraw0);
TextDrawHideForPlayer(playerid,Text:Textdraw1);
TextDrawHideForPlayer(playerid,Text:Textdraw2);
TextDrawHideForPlayer(playerid,Text:Textdraw3);
TextDrawHideForPlayer(playerid,Text:Textdraw4);
TextDrawHideForPlayer(playerid,Text:Textdraw5);
TextDrawHideForPlayer(playerid,Text:Textdraw6);
TextDrawHideForPlayer(playerid,Text:Textdraw7);
TextDrawShowForPlayer(playerid,Text:Textdraw35);
TextDrawShowForPlayer(playerid,Text:Textdraw36);
TextDrawShowForPlayer(playerid,Text:Textdraw37);
TextDrawShowForPlayer(playerid,Text:Textdraw38);
TextDrawShowForPlayer(playerid,Text:Textdraw39);
TextDrawShowForPlayer(playerid,Text:Textdraw40);
TextDrawShowForPlayer(playerid,Text:Textdraw41);
TextDrawShowForPlayer(playerid,Text:Textdraw42);
return 0;
}
}
return 1;
}
return 1;
}
and let me say i was so confused with this returns i dont even know if i script those thigs OK