points +1 - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: points +1 (
/showthread.php?tid=39355)
points +1 -
AleksandarAdzic - 10.06.2008
Hello ,i writing one more post,and i need help
Please if anyone knows how to do this please tell me.
ok this is the problem--------I want to make that when player enters in some aircraft (but only aircraft etc dodo,maverick,hunter,...) hes points riing on this diagram
1 real minute of flying = 1 point in game .
So PLEASE IF ANYBODY CAN HELP ME ,PLEASE MAKE SCRIPT EXAMPLE ,SO I CAN LEARN METHOD.
THANKS A LOT
Aleksandar Adzic
Re: points +1 -
Shadow07 - 10.06.2008
Try researching how to use timers in the script, then increment their points if they're in a specific vehicle.
Re: points +1 -
MidoBan - 10.06.2008
pawn Код:
new FlyPoints[MAX_PLAYERS];
new FlyTimer[MAX_PLAYERS];
pawn Код:
public OnPlayerConnect(playerid)
{
FlyPoints[playerid] = 0;
}
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate);
{
if (newstate == PLAYER_STATE_DRIVER)
{
new vehmdl = GetVehicleModel(GetPlayerVehicleID(playerid));
if (vehmdl == SomeModel || vehmdl == SomeModel2 || vehmdl == SomeModel3 ||... )
{
FlyTimer[playerid] = SetTimerEx("FlyTimer", 1000, 0, "iii", playerid, GetPlayerVehicleID(playerid), 0);
}
}
}
pawn Код:
forward FlyTimer(playerid, vehid, count);
public FlyTimer(playerid, vehid, count)
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if (GetPlayerVehicleID(playerid) == vehid)
{
if (count == 60)
{
FlyPoints[playerid] = FlyPoints[playerid]+1;
FlyTimer[playerid] = SetTimerEx("FlyTimer", 1000, 0, "iii", playerid, vehid, 0);
}
else
{
FlyTimer[playerid] = SetTimerEx("FlyTimer", 1000, 0, "iii", playerid, vehid, count+1);
}
}
}
}
}
Re: points +1 -
AleksandarAdzic - 10.06.2008
Quote:
Originally Posted by AleksandarAdzic
Hello ,i writing one more post,and i need help
Please if anyone knows how to do this please tell me.
ok this is the problem--------I want to make that when player enters in some aircraft (but only aircraft etc dodo,maverick,hunter,...) hes points riing on this diagram
1 real minute of flying = 1 point in game .
So PLEASE IF ANYBODY CAN HELP ME ,PLEASE MAKE SCRIPT EXAMPLE ,SO I CAN LEARN METHOD.
THANKS A LOT Aleksandar Adzic
And yes i use admin fs script ,and i want to make that when some player logged in,he can save his flying points
Please help
Adza
|
Re: points +1 -
Fresh9884 - 25.04.2010
Quote:
Originally Posted by MidoBan
pawn Код:
forward FlyTimer(playerid, vehid, count); public FlyTimer(playerid, vehid, count) { if (IsPlayerConnected(playerid)) { if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if (GetPlayerVehicleID(playerid) == vehid) { if (count == 60) { FlyPoints[playerid] = FlyPoints[playerid]+1; FlyTimer[playerid] = SetTimerEx("FlyTimer", 1000, 0, "iii", playerid, vehid, 0); } else { FlyTimer[playerid] = SetTimerEx("FlyTimer", 1000, 0, "iii", playerid, vehid, count+1); } } } } }
|
Wheree should I put the last script?