17.05.2010, 14:23
Hey.
I am first time trying to use Pvars, and Im not sure about playerid2 thing, that will it work.
Does this line work?:
if(GetPlayerVehicleID(playerid) == 411,GetPlayerVehicleID(playerid2) == 411)
Here is the untested part of code:
Im pretty sure that everything is not right there, if you can see what is wrong, tell me how I should do it.
(Compiles without errors...)
Since I haven't scripted very long, I don't have knownledge for how all things work so...![Wink](images/smilies/wink.png)
Regards,
Assyria
I am first time trying to use Pvars, and Im not sure about playerid2 thing, that will it work.
Does this line work?:
if(GetPlayerVehicleID(playerid) == 411,GetPlayerVehicleID(playerid2) == 411)
Here is the untested part of code:
Код:
forward Fare(playerid); public Fare(playerid) { new playerid2; if(InTaxi[playerid] != 1) return true; { new string[128]; SetPVarInt(playerid2, "FareAmmount", GetPVarInt(playerid, "FareAmmount")); format(string,sizeof(string),"~w~-~r~$%i",GetPVarInt(playerid, "FareAmmount")); GivePlayerMoney(playerid, - GetPVarInt(playerid, "FareAmmount")); GameTextForPlayer(playerid,string,3000,1); } if(IsAsTaxiDriver[playerid] != 1) return true; { if(GetDistanceBetweenPlayers(playerid,playerid2) < 5) { if(GetPlayerVehicleID(playerid) == 411,GetPlayerVehicleID(playerid2) == 411) { new string[128]; SetPVarInt(playerid2, "FareAmmount", GetPVarInt(playerid, "FareAmmount")); format(string,sizeof(string),"~w~+~r~$%i",GetPVarInt(playerid, "FareAmmount")); GivePlayerMoney(playerid, GetPVarInt(playerid,"FareAmmount")); GameTextForPlayer(playerid,string,3000,1); } } } return 1; }
(Compiles without errors...)
Since I haven't scripted very long, I don't have knownledge for how all things work so...
![Wink](images/smilies/wink.png)
Regards,
Assyria