Checkpoint 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: Checkpoint help (
/showthread.php?tid=413578)
Checkpoint help -
Noles2197 - 05.02.2013
pawn Код:
CMD:house(playerid, params[])
{
if(pInfo[playerid][Admin]==3)
{
//new Float:x,Float:y,Float:z;
//GetPlayerPos(playerid,x,y,z);
//house = CreateDynamicCP(x,y,z,1,GetPlayerVirtualWorld(playerid),GetPlayerInterior(playerid),5);
}
return 1;
}
public OnPlayerEnterDynamicCP(playerid,checkpointid)
{
if(checkpointid == house)
{
SendClientMessage(playerid,COLOR_GRAY,"/enter to enter house");
// If player does command /enter?
}
return 1;
}
Re: Checkpoint help -
vIBIENNYx - 06.02.2013
Few questions/points.
1. Do you have a PLAYER VARIABLE that states which house ID is saved to the player.
2. You should change "house" to "house[MAX_PLAYERS]" and have each one for each individual player, this is more optimal and makes it much less buggy in the end.
3. Make /enter a seperate command, checking the player's location then comparing it to the house pickups or co-ordinates you are using.
4. You don't want to get the Player position then create the checkpoint on top of them.
Answer/correct these and I will help further.
Re: Checkpoint help -
Noles2197 - 06.02.2013
PHP код:
(530) : error 033: array must be indexed (variable "house")
(547) : error 033: array must be indexed (variable "house")
(556) : error 033: array must be indexed (variable "house")
pawn Код:
if(checkpointid == house)