Jump to content

salexm93

Membru
  • Posts

    11
  • Joined

  • Last visited

Posts posted by salexm93

  1. Salutare 

    Poate nu inteleg eu bine , pe wiki scrie max 2048 globale si 256 per player .

    Sa luam cazul ipotetic al unui server cu 1000 de playeri online .

    new Text:xpbar[MAX_PLAYERS];
    new Text:playername[MAX_PLAYERS];

    Aici vor fi 2000 create ? Adica destul de aproape de limita

     

    new PlayerText:xpbar[MAX_PLAYERS];
    new PlayerText:playername[MAX_PLAYERS];

    Iar Aici vor fi doar 2 ?

    Totodata , PlayerTextDrawDestroy ,la onplayerdisconnect ?

  2. Salutare

    Se da urmatorul cod :

     new housenear =ReturnNearHouse(playerid,1.5);
    	            new string[256];
    	            format(string, sizeof (string), "buying house %i",housenear);
    	            SendClientMessage(playerid, 0xFFFFFFFF, string);
    	            if(HouseInfo[housenear][hStatus]==0&& housenear >-1)
    	            {
    	                if(PlayerInfo[playerid][pMoney]>=HouseInfo[housenear][hPrice])
    	                {
    	                    PlayerInfo[playerid][pMoney]  =PlayerInfo[playerid][pMoney]-HouseInfo[housenear][hPrice];
    	                    format(string, sizeof (string), "House %i is now yours ,congrats",housenear);
    	            		SendClientMessage(playerid, 0xFFFFFFFF, string);
    	            		HouseInfo[housenear][hOwner] = PlayerInfo[playerid][pName];
    	            		HouseInfo[housenear][hStatus]=2;
    	            		PlayerInfo[playerid][pHouse]=housenear;
    	            		format(string, sizeof (string),"LOCKED HOUSE\n\nHOUSE NO:{00FF00} %i\n{FFFFFF}OWNER{00FF00}%s\n",HouseInfo[housenear][hID],HouseInfo[housenear][hOwner]);
    	            		Update3DTextLabelText(HouseInfo[housenear][h3dtext], 0xFFFFFFFF, string);//1993
    	            		SaveHouse(housenear);
    	            		SendClientMessage(playerid,-1,string);
    	                    return 1;
    	                }
    	                else
    	                {
    	                    SendClientMessage(playerid, 0xFFFFFFFF, "Not enough money");
    						return 1;
    	                }
    	            }

    Rezultatul : Un amestec intre numele original de la hOwner si numele playerului :

    hOwner pentru 0 = stateh1 

    hOwner pentru 1 = stateh2 

    pName = Khafji

    wtf.png.2dbebb58c3c1bc3dce47cad5c2afef4b.png

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.