some problems with pickups
#1

On server i haveing two pickups

Код:
buspickup = CreatePickup(1239, 23, 1811.886, -1879.317, 13.227); // autobuze job
	gunoipickup = CreatePickup(1239, 23, 2086.214, -2083.438, 13.641); // gunoi job
with on players pickup

Код:
if(pickupid == buspickup)
    {
        GameTextForPlayer(playerid, "~w~Scrie ~r~/angajeaza~w~ pentru a deveni sofer de autobuz", 5000, 3);
        return 1;
    }
   	if(pickupid == gunoipickup)
    {
        GameTextForPlayer(playerid, "~w~Scrie ~r~/angajeaza~w~ pentru a deveni tehnician salubritate publica", 5000, 3);
        return 1;
    }
and comands

Код:
if(strcmp("/angajeaza", cmdtext, true, 10) == 0 )
	{
        if(IsPlayerInRangeOfPoint(playerid, 3,1811.886, -1879.317, 13.227))
            {
                if(PlayerInfo[playerid][pJob] == 0)
                {
                	SCM(playerid,COLOR_CRS3,"** Acum esti sofer de autobuz.");
                	PlayerInfo[playerid][pJob] = 1;
            	    new INI:File = INI_Open(UserPath(playerid));
				    INI_SetTag(File,"data");
				    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
				    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
				    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
				    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
				    INI_WriteInt(File,"pCarLic",PlayerInfo[playerid][pCarLic]);
				    INI_WriteInt(File,"pJob",PlayerInfo[playerid][pJob]);
				    INI_Close(File);

                }
                else
                {
                    SCM(playerid,COLOR_CRS3,"** Ai deja un job.");
                }
            }

		return 1;
	}
	if(strcmp("/angajeaza", cmdtext, true, 10) == 0 )
	{
        if(IsPlayerInRangeOfPoint(playerid, 3,2086.214, -2083.438, 13.641))
            {
                if(PlayerInfo[playerid][pJob] == 0)
                {
                	SCM(playerid,COLOR_CRS3,"** Acum esti tehnician salubritate publica.");
                	PlayerInfo[playerid][pJob] = 2;
            	    new INI:File = INI_Open(UserPath(playerid));
				    INI_SetTag(File,"data");
				    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
				    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
				    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
				    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
				    INI_WriteInt(File,"pCarLic",PlayerInfo[playerid][pCarLic]);
				    INI_WriteInt(File,"pJob",PlayerInfo[playerid][pJob]);
				    INI_Close(File);

                }
                else
                {
                    SCM(playerid,COLOR_CRS3,"** Ai deja un job.");
                }
            }
Now: The buspickup working, but gunoipickup not working.

When i'm in gunoipickup it say me "House: press /enter....." and my comand, /angajeaza, has not efect.


how i can resolve this to work like buspickup?
Reply
#2

You're having 2 commands with the same name... I believe one of them should actually be "/enter", right?
Reply
#3

no, now i realise that i have 2 cmd with same text but why it say me "House:type /enter to enter"

i dont want that, i want a simply "i" with no action

I want with same comand do difference action conditioned by my position, now i do that but my problem is why appear that red text - look picture
Reply
#4

Then do:
pawn Код:
if(strcmp("/angajeaza", cmdtext, true, 10) == 0 )
{
        if(IsPlayerInRangeOfPoint(playerid, 3,1811.886, -1879.317, 13.227))
        {
                if(PlayerInfo[playerid][pJob] == 0)
                {
                        SCM(playerid,COLOR_CRS3,"** Acum esti sofer de autobuz.");
                    PlayerInfo[playerid][pJob] = 1;
                        new INI:File = INI_Open(UserPath(playerid));
            INI_SetTag(File,"data");
            INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
            INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
            INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
            INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
            INI_WriteInt(File,"pCarLic",PlayerInfo[playerid][pCarLic]);
            INI_WriteInt(File,"pJob",PlayerInfo[playerid][pJob]);
            INI_Close(File);

                }
                else SCM(playerid,COLOR_CRS3,"** Ai deja un job.");
        }
    else if(IsPlayerInRangeOfPoint(playerid, 3,2086.214, -2083.438, 13.641))
        {
                if(PlayerInfo[playerid][pJob] == 0)
                {
                    SCM(playerid,COLOR_CRS3,"** Acum esti tehnician salubritate publica.");
                    PlayerInfo[playerid][pJob] = 2;
                        new INI:File = INI_Open(UserPath(playerid));
            INI_SetTag(File,"data");
            INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
            INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
            INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
            INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
            INI_WriteInt(File,"pCarLic",PlayerInfo[playerid][pCarLic]);
            INI_WriteInt(File,"pJob",PlayerInfo[playerid][pJob]);
            INI_Close(File);

                }
                else SCM(playerid,COLOR_CRS3,"** Ai deja un job.");
        }
        return 1;
}
Reply
#5

i do this now but the text "House: type /enter to enter" still appear, why? when i reach pickup
Reply
#6

CTRL + F "House: type /enter to enter" > change the message to whatever you want.
Reply
#7

i dont have this mesage on my gamemode, if i search only house my search dont have found
Reply
#8

Then search in your filterscripts.
Reply
#9

thank you very much, i found in gl_property, thankyou
Reply
#10

It's a filterscript made by the SAMP team go to your server.cfg and remove all the filterscripts that u dont know.
Код:
filterscripts blabla blabla
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)