PDA

View Full Version : Checkpoint help


Noles2197
05/02/2013, 11:16 PM
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(play erid),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;
}

vIBIENNYx
06/02/2013, 03:17 AM
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.

Noles2197
06/02/2013, 09:01 PM
(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")

if(checkpointid == house)