some problems with pickups -
moof2010 - 12.11.2013
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?
Re: some problems with pickups -
Loot - 12.11.2013
You're having 2 commands with the same name... I believe one of them should actually be "/enter", right?
Re: some problems with pickups -
moof2010 - 12.11.2013
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
Re: some problems with pickups -
Loot - 12.11.2013
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;
}
Re: some problems with pickups -
moof2010 - 12.11.2013
i do this now but the text "House: type /enter to enter" still appear, why? when i reach pickup
Re: some problems with pickups -
Loot - 12.11.2013
CTRL + F "House: type /enter to enter" > change the message to whatever you want.
Re: some problems with pickups -
moof2010 - 12.11.2013
i dont have this mesage on my gamemode, if i search only house my search dont have found
Re: some problems with pickups -
Loot - 12.11.2013
Then search in your filterscripts.
Re: some problems with pickups -
moof2010 - 12.11.2013
thank you very much, i found in gl_property, thankyou
Re: some problems with pickups -
Beckett - 12.11.2013
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