Posts: 190
Threads: 36
Joined: Aug 2009
Reputation:
0
Hello, What i want today Is: that i have donator cars, Now, I have the function (IsPlayerDonator) or something like that xD it works, And i just wanted to know, how can i restrict a car to donators? I have searched and can't find anything, Thank you in advance :O
Posts: 52
Threads: 4
Joined: Oct 2010
Reputation:
0
every time u open a bracet ( u have to close it right
Soo when if(vid == DONOR[1] || if(IsPlayerVipMember(playerid));//<< that is correct
at the end of it there is two bracets they close off (playerid and if(vid
Posts: 554
Threads: 49
Joined: Feb 2007
pawn Код:
forward IsDonatorcar(vehicleid);
public IsDonatorCar(vehicleid)
{
if(vehicleid >= *put there starting car id* && vehicleid <= *put there ending car id*)
{
return 1;
}
return 0;
}
under OnPlayerEnterVehicle
pawn Код:
if (IsDonatorCar(vehicleid) && !ispassenger))
{
if(IsPlayerDonator[playerid] != 1) // Change to your function
{
ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
SetVehicleParamsForPlayer(vehicleid,playerid,0,1);
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
SetPlayerPos(playerid, cx, cy, cz);
SendClientMessage(playerid,COLOR_GREY,"Car is reserved for donators.");
ApplyAnimation(playerid, "ped", "CAR_doorlocked_LHS", 3.0, 0, 0, 0, 0, 0);
}
}
Posts: 554
Threads: 49
Joined: Feb 2007
Quote:
Originally Posted by TheNotorius
Damn errors -_-
D:
pawn Код:
\gamemodes\Server1.pwn(291) : error 012: invalid function call, not a valid address \gamemodes\Server1.pwn(291) : warning 215: expression has no effect \gamemodes\Server1.pwn(291) : error 001: expected token: ";", but found ")" \gamemodes\Server1.pwn(291) : error 029: invalid expression, assumed zero \gamemodes\Server1.pwn(291) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Error Line:
pawn Код:
if (IsDonatorCar(vehicleid) && !ispassenger));
Gah >.<
|
pawn Код:
if (IsDonatorCar(vehicleid) && !ispassenger)