SA-MP Forums Archive
Need help with public IsPlayerInDynamicCP(playerid, checkpointid); - 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: Need help with public IsPlayerInDynamicCP(playerid, checkpointid); (/showthread.php?tid=567615)



Need help with public IsPlayerInDynamicCP(playerid, checkpointid); - Sc0pion - 15.03.2015

Fixed!


Re: Need help with public IsPlayerInDynamicCP(playerid, checkpointid); - DeitY - 15.03.2015

It means that you have already defined somewhere IsPlayerInDynamicCP , therefore could be in your other includes or filterscript, or even in your gamemode. Quick search it and check your functions.

Anyway why are you using checkpoint for buying weapons really? Why not simply isplayerinrangepoint?


Re: Need help with public IsPlayerInDynamicCP(playerid, checkpointid); - Sc0pion - 15.03.2015

Fixed!


Re: Need help with public IsPlayerInDynamicCP(playerid, checkpointid); - DeitY - 15.03.2015

Then probably u have in some other include. Isplayerinragepoint, well simple, go to your position, type /save , then go my documetts - samp - savedpositions.txt , copy me whole line and ill write you code for it!


Re: Need help with public IsPlayerInDynamicCP(playerid, checkpointid); - Sc0pion - 15.03.2015

Fixed!


Re: Need help with public IsPlayerInDynamicCP(playerid, checkpointid); - DeitY - 15.03.2015

Try like this, i'm not that much experienced..

//YCMD/ZCMD command buyweapon
if(!IsPlayerInRangeOfPoint(playerid, 2.0, 314.2579,-133.7782,999.6016)) return SendClientMessage(playerid, 0x21DD00FF, "You are not in right place. ");

ShowWeaponDialog(playerid);

anyway why are you sending 3 sendclientmessages for nothing, even if hes in that range he'd get 3 messages..

// your code


Re: Need help with public IsPlayerInDynamicCP(playerid, checkpointid); - Jimmy0wns - 15.03.2015

Код:
public IsPlayerInDynamicCP(playerid, checkpointid)
{
	if(checkpointid == weapon_shop[0] || checkpointid == weapon_shop[1])
	{
	     ShowWeaponDialog(playerid);
	     SendClientMessage(playerid, -1, ""COL_GREEN"[ Green Color - You have enough ammo for that weapon. ]");
	     SendClientMessage(playerid, -1, ""COLOR_MARONE"[ Maroon Color - You have that weapon but with less ammo. ]");
	     SendClientMessage(playerid, -1, ""COL_WHITE"[ White Color - You don't have that weapon. ]");
	}
	return 1;
}
I don't even know how you managed to do this wrong, oh well.


Re: Need help with public IsPlayerInDynamicCP(playerid, checkpointid); - Sc0pion - 15.03.2015

Fixed!


Re: Need help with public IsPlayerInDynamicCP(playerid, checkpointid); - DeitY - 15.03.2015

Show list of all your includes, and we can maybe find for you problem.


Re: Need help with public IsPlayerInDynamicCP(playerid, checkpointid); - Sc0pion - 15.03.2015

Fixed!