SA-MP Forums Archive
Help please - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help please (/showthread.php?tid=134864)



Help please - bartje01 - 17.03.2010

hey guys .I have a cmd that shows you a checkpoint.

problem: The checkpoint should only shows when you did the cmd at the right positions. I tought I scripted that in fine.
it seems that I didn't.The checkpoint shows up everywhere. Please help
Код:
 if(strcmp(cmd, "/drugsmission", true) == 0) {
	
	if(IsPlayerInRangeOfPoint(playerid, 7.0, -572.7808,-1498.3749,9.5741)) return SendClientMessage(playerid, red, "You are not at the drugs farm");
 {
  SetPlayerRaceCheckpoint(playerid,0,1541.0101,-1675.0453,13.5517,-2007.3123,-73.4380,34.8973,4.0);
  GameTextForPlayer(playerid," ~y~ Pick up the drugs.",4000,4);
	gPlayerDrivingCheckpoints[playerid] = DRUGS_CHECKPOINT;
  
}

	return 1;


 }



Re: Help please - laser50 - 17.03.2010

maybe just do
}else{
//empty
}??


Re: Help please - Correlli - 17.03.2010

pawn Код:
if(strcmp(cmd, "/drugsmission", true) == 0)
{
  if(IsPlayerInRangeOfPoint(playerid, 7.0, -572.7808, -1498.3749, 9.5741))
  {
    SetPlayerRaceCheckpoint(playerid, 0, 1541.0101, -1675.0453, 13.5517, -2007.3123, -73.4380, 34.8973, 4.0);
    GameTextForPlayer(playerid, "~y~Pick up the drugs.", 4000, 4);
    gPlayerDrivingCheckpoints[playerid] = DRUGS_CHECKPOINT;
  }
  else SendClientMessage(playerid, red, "You are not at the drugs farm.");
  return true;
}



Re: Help please - bartje01 - 17.03.2010

Thanks for the fast response. It works btw


Re: Help please - Correlli - 17.03.2010

You're welcome.