help please - 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: help please (
/showthread.php?tid=244937)
help please -
jejemonerz123 - 29.03.2011
i wanna make a score and money giver you get money and score if you are in the aircrafts
like shamal
Re: help please -
Medal Of Honor team - 29.03.2011
you mean that when player will enter shamal, they will score and money?
Re: help please -
Gamer_Z - 29.03.2011
Please describe it more, I don't understand your language at all... Maybe ****** translate is better?
And why do you post teddy bears? XD
Re: help please -
jejemonerz123 - 29.03.2011
Quote:
Originally Posted by Medal Of Honor team
you mean that when player will enter shamal, they will score and money?
|
no its available in all aircrafts and when they are inside the plane driving it they will have score and money every 1minute
Re: help please -
jejemonerz123 - 29.03.2011
Quote:
Originally Posted by gamer_Z
Please describe it more, I don't understand your language at all... Maybe ****** translate is better?
And why do you post teddy bears? XD
|
its my signature Xd
Re: help please -
iggy1 - 29.03.2011
Note you will need a function to check if the player is in an airplane for this to work. You will need to do something like this,
pawn Код:
#include <a_samp>
AirPay( playerid );
new airTimers[ MAX_PLAYERS ];
public OnPlayerDisconnect(playerid, reason)
{
KillTimer( airTimers[ playerid ] );//kill timer when they disconnect
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if( IsAirPlane ( vehicleid ))//you will need to find/create this function.
airTimers[ playerid ] = SetTimerEx( "AirPay", 60*1000, true, "i", playerid );//timer to give score/money
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(IsInAirPlane( playerid ))//you will need to find/create this function too.
KillTimer( airTimers[ playerid ] );//kill the timer when they leave
return 1;
}
public AirPay( playerid )
{
if(IsInAirPlane( playerid ))
{
GivePlayerMoney( playerid, 1000);
SetPlayerScore( playerid, GetPlayerScore( playerid ) +1 );
}
else
KillTimer( airTimers[ playerid ] );
}