12.01.2012, 20:19
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;
}
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;
}