Checkpoint isnt responding - 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: Checkpoint isnt responding (
/showthread.php?tid=469832)
Checkpoint isnt responding -
efrim123 - 14.10.2013
Hello
i made a few checkpoints and i made a command that is /robshop but
when i use it nothing happends and i setted it to the command too
and there is no errors in pawno
Here is my code:
pawn Код:
CMD:robshop(playerid,params[])
{
if(IsPlayerInDynamicCP(playerid,2))
{
SendClientMessage(playerid,COLOR_BLUE,"You have robbed 24/7 shop your wanted level is increased!");
GivePlayerMoney(playerid,2000);
IncreaseWantedLevel(playerid,4);
return 1;
}
return 1;
}
CheckPoints:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == Checkpoint[0])
{
SendClientMessage(playerid, COLOR_ROYALBLUE, "Welcome to 24/7 Shop");
SetPlayerInterior(playerid, 16);
SetPlayerPos(playerid,-29.4883,-140.0293,1003.5469);
SetPlayerFacingAngle(playerid,350.6350);
}
if(checkpointid == Checkpoint[1])
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1932.4558,-1775.2700,13.3828);
SetPlayerFacingAngle(playerid,274.7027);
}
if(checkpointid == Checkpoint[2])
{
SendClientMessage(playerid,COLOR_BLUE,"Type /robshop to start a robbery!");
}
return 1;
}
if i get it fixed i will rep for the helper
Re: Checkpoint isnt responding -
Pottus - 14.10.2013
Pretty obvious here look at this line...
if(IsPlayerInDynamicCP(playerid,2))
Your referencing 2 what is 2 certainly not your Checkpointid
Re: Checkpoint isnt responding -
efrim123 - 14.10.2013
So how I fix it?
Re: Checkpoint isnt responding -
Pottus - 14.10.2013
Use the correct checkpoint reference id of course.
Re: Checkpoint isnt responding -
efrim123 - 14.10.2013
Thanks rep for you