SA-MP Forums Archive
about understanding pawno - 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: about understanding pawno (/showthread.php?tid=111370)



about understanding pawno - Sfinx_17 - 01.12.2009

ok i decide for example to create a hydra but when a player enter in the hydra to lose money ..so how to create the code?
first i have to make something like
pawn Код:
new oneplayerenterhydra;
or what?
or to make a forward?
somewone....tell me i will apreciate.


Re: about understanding pawno - Virtual1ty - 01.12.2009

onplayerentervehicle > check if the vehicle player enter's is hydra.. > GivePlayerMoney(playerid, -money)


Re: about understanding pawno - Sfinx_17 - 01.12.2009

ok and how to choose that when a player enter only in hydra to loose money?


Re: about understanding pawno - Virtual1ty - 01.12.2009

Quote:
Originally Posted by Sfinx_17
thank you
np


Re: about understanding pawno - miokie - 01.12.2009

Quote:
Originally Posted by Sfinx_17
ok and how to choose that when a player enter only in hydra to loose money?
In OnPlayerStateChange:
pawn Код:
if(newstate == PLAYER_STATE_DRIVER && GetPlayerVehicleID(playerid) == 520)
{
GivePlayerMoney(playerid,-5000);
}
This will take away $5000 when a player enters a hydra.




Re: about understanding pawno - dice7 - 01.12.2009

Quote:
Originally Posted by Miokie*
In OnPlayerStateChange:
pawn Код:
if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 520)
{
GivePlayerMoney(playerid,-5000);
}
This will take away $5000 when a player enters a hydra.




Re: about understanding pawno - patchkinson - 01.12.2009

Quote:
Originally Posted by dice7
Quote:
Originally Posted by Miokie*
In OnPlayerStateChange:
pawn Код:
if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == 520)
{
GivePlayerMoney(playerid,-5000);
}
This will take away $5000 when a player enters a hydra.

exactly
you dont need any array



Re: about understanding pawno - Daren_Jacobson - 01.12.2009

Your example script is wrong, you are getting VehicleID when you should be calling for the ModelID.


Re: about understanding pawno - M1GU3L - 02.12.2009

Don't you need a timer for this?