31.08.2009, 20:07
pawn Код:
if(strcmp(cmdtext, "/rent", true, 5) == 0)
{
new S = GetPlayerState(playerid);
if(IsPlayerInVehicle(playerid, Hire_Able_Vehicle) && S (playerid) != PLAYER_STATE_PASSENGER)
{
if(GetPlayerMoney(playerid) > 75)
{
Owner[playerid] = 1; // He is the owner
IsVehicleHasOwner = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "* You have successfully rented a vehicle, to unrent it, type '/unrent', Have a nice day!");
GivePlayerMoney(playerid, -75);
return true;
}
else return SendClientMessage(playerid, 0xFFFFFFAA, "* Not enough money.");
}
else return SendClientMessage(playerid, 0xFFFFFFAA, "* This vehicle is not available for rent. / You are not the vehicle driver.");
}
Код:
C:\Documents and Settings\Usuario\Desktop\samp02Xserver.win32\gamemodes\bRP.pwn(276) : error 012: invalid function call, not a valid address C:\Documents and Settings\Usuario\Desktop\samp02Xserver.win32\gamemodes\bRP.pwn(276) : warning 215: expression has no effect C:\Documents and Settings\Usuario\Desktop\samp02Xserver.win32\gamemodes\bRP.pwn(276) : error 001: expected token: ";", but found ")" C:\Documents and Settings\Usuario\Desktop\samp02Xserver.win32\gamemodes\bRP.pwn(276) : error 029: invalid expression, assumed zero C:\Documents and Settings\Usuario\Desktop\samp02Xserver.win32\gamemodes\bRP.pwn(276) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
if(IsPlayerInVehicle(playerid, Hire_Able_Vehicle) && S (playerid) != PLAYER_STATE_PASSNGER)