If player is not in pickup?? How to do this? +extra question
#1

I have fishing system and i would like to make it like i cannot fish when im not in fishingpoint

public OnPlayerPickUpPickup(playerid,pickupid)
{
if(pickupid == fishpoint1)
{
fishpointfirst[playerid]=1;
if(Fishing[playerid]==0)
{
if(FRod[playerid]==1)
{
GameTextForPlayer(playerid,"~g~Press ~y~~k~~VEHICLE_ENTER_EXIT~~b~ to start fishing.", 3000, 3);
}
}
if(Fishing[playerid]==1)
{
SetPlayerFacingAngle(playerid,3.9890);
SetCameraBehindPlayer(playerid);
ApplyAnimation(playerid,"SWORD","sword_block",50.0 ,0,1,0,1,1);
}
}
else
{
fishpointfirst[playerid]=0;
}

return 1;
}



//================================================== ===============================
and another of my questions is that why i cannot mark stuff into accountfile by using dini when array goes like this:

Public OnPlayerDisconnect(playerid, reason)
{
new PName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PName, MAX_PLAYER_NAME);
format(AccountFile, sizeof(AccountFile), PLAYERFILE, PName);
if(dm2[playerid]==1)
{
dini_IntSet(AccountFile,"randomspawn",1);
}

return 1;
}
Reply
#2

if(pickupid != fishpoint1) -something like this , i guess , but better use checkpoints for this , i dont really know if this would work with pickups
Reply
#3

Yeah but that means player has to take any other pickup to use that array.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)