Jump to content

ShowBell

Membru
  • Posts

    96
  • Joined

  • Last visited

    Never

Posts posted by ShowBell

  1. aici #include

    #include <a_samp>
    #include<a_objects>
    //#include <a_sampmysql>
    #include <core>
    #include <float>
    #include <time>
    #include <file>
    #include <utils>
    #include <morphinc>
    #include <MidoStream>
    #include <audio>
    Si folosesc FSul
    MidoStream.amx

  2. pune asta in GM

    #define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
    #define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
    #define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTACHED_OBJECTS-1)
    

    Le am puse...

  3. Am o problema , dintro data imi da erorile astea:

    D:\bell\gamemodes\snow.pwn(2945) : error 017: undefined symbol "IsPlayerAttachedObjectSlotUsed"
    D:\bell\gamemodes\snow.pwn(2945) : error 017: undefined symbol "RemovePlayerAttachedObject"
    D:\bell\gamemodes\snow.pwn(2945) : error 029: invalid expression, assumed zero
    D:\bell\gamemodes\snow.pwn(2945) : fatal error 107: too many error messages on one line
    Am mai modificat eu cate ceva si am ajuns la atatea erori... Linia este:
    	    if(IsPlayerAttachedObjectSlotUsed(playerid,1 RemovePlayerAttachedObject(playerid,1));
    		SetPlayerAttachedObject(playerid, 1 , 18637, 1, 0, -0.1, 0.18, 90, 0, 272, 1, 1, 1);

  4. if(strcmp(cmd, "/sellbiz", true) == 0)

    {

        if(IsPlayerConnected(playerid))

    {

    GetPlayerName(playerid, playername, sizeof(playername));

    if(PlayerInfo[playerid][pPbiskey] == 255)

    {

    SendClientMessage(playerid, COLOR_WHITE1, "You don't own a bizz.");

    return 1;

    }

    if(PlayerInfo[playerid][pMarried] > 0)

        {

            SendClientMessage(playerid, COLOR_GREY, "  You are Married, can't sell the House !");

            return 1;

        }

    if(PlayerInfo[playerid][pPbiskey] >= 100 && strcmp(playername, SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0)

    {

    new bouse = PlayerInfo[playerid][pPbiskey]-100;

    GivePlayerCash(playerid,SBizzInfo[bouse][sbTill]);

    SBizzInfo[bouse][sbLocked] = 1;

    SBizzInfo[bouse][sbOwned] = 0;

    GetPlayerName(playerid, sendername, sizeof(sendername));

    strmid(SBizzInfo[bouse][sbOwner], "The State", 0, strlen("The State"), 255);

    strmid(SBizzInfo[bouse][sbExtortion], "No-one", 0, strlen("No-one"), 255);

    //ConsumingMoney[playerid] = 1;

    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

    format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", SBizzInfo[bouse][sbTill]);

    GameTextForPlayer(playerid, string, 10000, 3);

    SBizzInfo[bouse][sbTill] = 0;

    PlayerInfo[playerid][pPbiskey] = 255;

    OnPropUpdate();

    OnPlayerUpdateEx(playerid);

    OnPropTextdrawUpdate(2, bouse);

    return 1;

    }

    if(strcmp(playername, BizzInfo[PlayerInfo[playerid][pPbiskey]][bOwner], true) == 0)

    {

    new bouse = PlayerInfo[playerid][pPbiskey];

    BizzInfo[bouse][bLocked] = 1;

    BizzInfo[bouse][bOwned] = 0;

    GetPlayerName(playerid, sendername, sizeof(sendername));

    strmid(BizzInfo[bouse][bOwner], "The State", 0, strlen("The State"), 255);

    strmid(BizzInfo[bouse][bExtortion], "No-one", 0, strlen("No-one"), 255);

    //ConsumingMoney[playerid] = 1;

    GivePlayerCash(playerid,BizzInfo[bouse][bTill]);

    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);

    format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", BizzInfo[bouse][bTill]);

    GameTextForPlayer(playerid, string, 10000, 3);

    BizzInfo[bouse][bTill] = 0;

    PlayerInfo[playerid][pPbiskey] = 255;

    OnPropUpdate();

    OnPlayerUpdateEx(playerid);

    OnPropTextdrawUpdate(3, bouse);

    return 1;

    }

    else

    {

    SendClientMessage(playerid, COLOR_WHITE1, "You don't own a business.");

    }

    }

    return 1;

    }

    Totusi aici am gresit ceva se pare ... uitate cum am pus OnPropTextdrawUpdate

  5. if(strcmp(cmd, "/sellhouse", true) == 0)
    	{
    	    if(IsPlayerConnected(playerid))
    		{
    			GetPlayerName(playerid, playername, sizeof(playername));
    			if(PlayerInfo[playerid][pPhousekey] == 255)
    			{
    				SendClientMessage(playerid, COLOR_WHITE1, "You don't own a house.");
    				return 1;
    			}
    			if(PlayerInfo[playerid][pMarried] > 0)
    		    {
    		        SendClientMessage(playerid, COLOR_GREY, "   You are Married, can't sell the House !");
    		        return 1;
    		    }
    			if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
    			{
    				new house = PlayerInfo[playerid][pPhousekey];
    				HouseInfo[house][hHel] = 0;
    				HouseInfo[house][hArm] = 0;
    				HouseInfo[house][hHealthx] = 0;
    				HouseInfo[house][hHealthy] = 0;
    				HouseInfo[house][hHealthz] = 0;
    				HouseInfo[house][hArmourx] = 0;
    				HouseInfo[house][hArmoury] = 0;
    				HouseInfo[house][hArmourz] = 0;
    				HouseInfo[house][hLock] = 1;
    				HouseInfo[house][hOwned] = 0;
    				HouseInfo[house][hVec] = 418;
    				HouseInfo[house][hVcol1] = -1;
    				HouseInfo[house][hVcol2] = -1;
    				GetPlayerName(playerid, sendername, sizeof(sendername));
    				strmid(HouseInfo[house][hOwner], "The State", 0, strlen("The State"), 255);
    				//ConsumingMoney[playerid] = 1;
    				GivePlayerCash(playerid,HouseInfo[house][hValue]);
    				format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", HouseInfo[house][hValue]);
    				GameTextForPlayer(playerid, string, 10000, 3);
    				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    				PlayerInfo[playerid][pPhousekey] = 255;
    				if(PlayerInfo[playerid][pLocal] == house)
    				{
    					SetPlayerInterior(playerid,0);
    					SetPlayerVirtualWorld(playerid,0);
    					SetPlayerPos(playerid,HouseInfo[house][hEntrancex],HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]);
    					PlayerInfo[playerid][pInt] = 0;
    				}
    				OnPropUpdate();
    				OnPlayerUpdateEx(playerid);
    				OnPropTextdrawUpdate(1, id);
    				return 1;
    			}
    			else
    			{
    				SendClientMessage(playerid, COLOR_WHITE1, "You don't own a house.");
    			}
    		}
    		return 1;
    	}
    si
    	if(strcmp(cmd, "/buyhouse", true) == 0)
    	{
    	    if(IsPlayerConnected(playerid))
    	    {
    			new Float:oldposx, Float:oldposy, Float:oldposz;
    			GetPlayerName(playerid, playername, sizeof(playername));
    			GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    			for(new h = 0; h < sizeof(HouseInfo); h++)
    			{
    				if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
    				{
    					if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
    					{
    						format(string, sizeof(string), "   You must be Level %d to purchase this !", HouseInfo[h][hLevel]);
    						SendClientMessage(playerid, COLOR_GRAD5, string);
    						return 1;
    					}
    					if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
    					{
    						SendClientMessage(playerid, COLOR_WHITE1, "   You already own a house, type /sellhouse if you want to buy this one !");
    						return 1;
    					}
    					if(GetPlayerCash(playerid) > HouseInfo[h][hValue])
    					{
    						PlayerInfo[playerid][pPhousekey] = h;
    						HouseInfo[h][hOwned] = 1;
    						HouseEntered[playerid] = h;
    						GetPlayerName(playerid, sendername, sizeof(sendername));
    						strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
    						GivePlayerCash(playerid,-HouseInfo[h][hValue]);
    						PlayerPlayMusic(playerid);
    						SetPlayerInterior(playerid,HouseInfo[h][hInt]);
    						SetPlayerVirtualWorld(playerid,HouseInfo[h][hWorld]);
    						SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
    						GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3);
    						PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
    						PlayerInfo[playerid][pLocal] = h;
    						SendClientMessage(playerid, COLOR_WHITE1, "Felicitari pentru noua achizitie!");
    						SendClientMessage(playerid, COLOR_WHITE1, "Tasteaza /help pentru mai multe informatii!");
                            DateProp(playerid);
    						OnPropUpdate();
    						OnPlayerUpdateEx(playerid);
    						OnPropTextdrawUpdate(1, id);
    						return 1;
    					}
    					else
    					{
    						SendClientMessage(playerid, COLOR_WHITE1, "   Nu ai bani destui !");
    						return 1;
    					}
    				}
    			}
    		}
    		return 1;
    	}

  6. public OnPropTextdrawUpdate(update, id)
    {
    	if(update == 1)
    	{
    		if(HouseInfo[id][hOwned] == 0)
    		{
                Delete3DTextLabel(HouseLabel[id]);
                format(PropertyString,sizeof(PropertyString),"For Sale! \n Price: $%d \n House: %s \n Level: %d",HouseInfo[id][hValue],HouseInfo[id][hDiscription], HouseInfo[id][hLevel]);
    			HouseLabel[id] = Create3DTextLabel(PropertyString ,COLOR_GROVE,HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez],20.0, 0, 1);
    		}
    		else if(HouseInfo[id][hOwned] == 1)
    		{
    		    Delete3DTextLabel(HouseLabel[id]);
    			format(PropertyString,sizeof(PropertyString),"Owner: %s \n Rent Price: $%d \n House: %s \n To Rent Type /rentroom",HouseInfo[id][hOwner],HouseInfo[id][hRent], HouseInfo[id][hDiscription]);
    			HouseLabel[id] = Create3DTextLabel(PropertyString ,COLOR_GROVE,HouseInfo[id][hEntrancex], HouseInfo[id][hEntrancey], HouseInfo[id][hEntrancez],20.0, 0, 1);
    		}
    	}
    	else if(update == 2)
    	{
    		if(BizzInfo[id][bOwned] == 0)
    		{
    		    Delete3DTextLabel(BizzLabel[id]);
    			format(PropertyString,sizeof(PropertyString),"For Sale! \n Name: %s \n Price: $%d \n Level: %d \n To Buy This, /buybiz",BizzInfo[id][bMessage],BizzInfo[id][bBuyPrice], BizzInfo[id][bLevelNeeded]);
    			BizzLabel[id] = Create3DTextLabel(PropertyString ,COLOR_GROVE,BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ],20.0, 0, 1);
    		}
    		else if(BizzInfo[id][bOwned] == 1)
    		{
    		    Delete3DTextLabel(BizzLabel[id]);
    			format(PropertyString,sizeof(PropertyString),"Name: %s \n Owner: %s \n Extortion: %s \n Entering Fee: $%d. \n To enter this, /enter.",BizzInfo[id][bMessage],BizzInfo[id][bOwner],BizzInfo[id][bExtortion], BizzInfo[id][bEntranceCost]);
    			BizzLabel[id] = Create3DTextLabel(PropertyString ,COLOR_GROVE,BizzInfo[id][bEntranceX], BizzInfo[id][bEntranceY], BizzInfo[id][bEntranceZ],20.0, 0, 1);
    		}
    	}
    	else if(update == 3)
    	{
    		if(SBizzInfo[id][sbOwned] == 0)
    		{
    		    Delete3DTextLabel(SBizzLabel[id]);
    			format(PropertyString,sizeof(PropertyString),"For Sale! \n Name: %s \n Price: $%d \n Level: %d \n To Buy This, /buysbiz",SBizzInfo[id][sbMessage],SBizzInfo[id][sbBuyPrice], SBizzInfo[id][sbLevelNeeded]);
    			SBizzLabel[id] = Create3DTextLabel(PropertyString ,COLOR_GROVE,SBizzInfo[id][sbEntranceX], SBizzInfo[id][sbEntranceY], SBizzInfo[id][sbEntranceZ],20.0, 0, 1);
    		}
    		else if(SBizzInfo[id][sbOwned] == 1)
    		{
    		    Delete3DTextLabel(SBizzLabel[id]);
    			format(PropertyString,sizeof(PropertyString),"Name: %s \n Owner: %s \n Extortion: %s \n Entering Fee: $%d. \n To enter this, /enter.",SBizzInfo[id][sbMessage],SBizzInfo[id][sbOwner],SBizzInfo[id][sbExtortion], SBizzInfo[id][sbEntranceCost]);
    			SBizzLabel[id] = Create3DTextLabel(PropertyString ,COLOR_GROVE,SBizzInfo[id][sbEntranceX], SBizzInfo[id][sbEntranceY], SBizzInfo[id][sbEntranceZ],20.0, 0, 1);
    		}
    	}
    	return 1;
    }
    

    Asta e updateul dar nu stiu sub ce forma sa il pun la /sellhouse,/buyhouse alea alea ... sau unde sa il folosesc...

×
×
  • 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.