SA-MP Forums Archive
Getcrate help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Getcrate help (/showthread.php?tid=508480)



Getcrate help - Moleex - 22.04.2014

look there

http://i.imgur.com/VjRWtGs.png


Code:

CMD:getcrate(playerid, params[])
{
if (PlayerInfo[playerid][pJob] != 14 && PlayerInfo[playerid][pJob2] != 14)
{
SendClientMessageEx(playerid,COLOR_GREY," You are not a Drug Smuggler!");
return 1;
}
new mypoint = -1;

new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
for (new i=0; i<MAX_POINTS; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2232.23, 1580.10, 999.97))
{
mypoint = i;
}
}
if (mypoint == 1)
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not at the Drug Factory!");
return 1;
}
if(PlayerInfo[playerid][pCrates])
{
SendClientMessageEx(playerid, COLOR_GREY, " You can't hold any more Drug Crates!");
return 1;
}
if(GetPlayerCash(playerid) > 1000)
{
SendClientMessageEx(playerid, COLOR_LIGHTRED,"What type of drugs would you like to smuggle? (Type crack or pot)");
SetPVarInt(playerid, "ChoosingDrugs", 1);
return 1;
}
else
{
SendClientMessageEx(playerid, COLOR_GREY," You can't afford the $1000!");
return 1;
}
}


Re: Getcrate help - Conradus - 22.04.2014

Change
pawn Код:
if (mypoint == 1)
To
pawn Код:
if (mypoint != 1)
Please post your code in ["code"]...["/code"] or ["pawn"]...["/pawn"] tags (without quotes) and use proper indentation, it makes it a lot easier for us to help you.


Re: Getcrate help - Moleex - 22.04.2014

I'm put the code and i do /getcrate there say you are not in drug factory i'm in the pos :
2232.23, 1580.10, 999.97