12.11.2013, 12:37
On server i haveing two pickups
with on players pickup
and comands
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?
Код:
buspickup = CreatePickup(1239, 23, 1811.886, -1879.317, 13.227); // autobuze job gunoipickup = CreatePickup(1239, 23, 2086.214, -2083.438, 13.641); // gunoi job
Код:
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;
}
Код:
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.");
}
}
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?

