SA-MP Forums Archive
If player is not in pickup?? How to do this? +extra question - 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: If player is not in pickup?? How to do this? +extra question (/showthread.php?tid=310558)



If player is not in pickup?? How to do this? +extra question - liinor - 12.01.2012

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;
}


Re: If player is not in pickup?? How to do this? +extra question - DonWade - 12.01.2012

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


Re: If player is not in pickup?? How to do this? +extra question - liinor - 13.01.2012

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