about understanding pawno
#1

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.
Reply
#2

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

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

Quote:
Originally Posted by Sfinx_17
thank you
np
Reply
#5

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.

Reply
#6

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.

Reply
#7

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
Reply
#8

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

Don't you need a timer for this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)