30.05.2011, 21:45
So, I'm making a script where you need a certain amount of score to enter a aircraft, this is what I got.
Note: Im still a noob with scripting.
And this is what I got:
Can anyone help?
Note: Im still a noob with scripting.
pawn Код:
#include <a_samp>
#include <a_colors>
#include <JunkBuster>
//Planes that require 0 score:
//Dodo
//Beagle
//Nevada
//Stuntplane
//Maverick
//Skimmer
//Cropduster
//Planes that require 20 Score:
//Shamal
//Raidence
//Cargobob
//Planes that require 40 Score:
//AT-400
//Andromada
//Leviathan
//Planes that require 60 score:
//Hydya
//Hunter
//Rustler
//Planes that are not used ingame:
//Sparow
//Seasparow
//Police Maverick
//News Maverick
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
//20 Score Aircraft
if(GetPlayerScore(playerid, < 20) && IsPlayerInVehicle(playerid, 519))
SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Shamal!");
RemovePlayerFromVehicle(playerid);
else
if(GetPlayerScore(playerid, < 20) && IsPlayerInVehicle(playerid, 563))
SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Raindance!");
RemovePlayerFromVehicle(playerid);
else
if(GetPlayerScore(playerid, < 20) && IsPlayerInVehicle(playerid, 548))
SendClientMessage(playerid, COLOR_RED, "You need 20 flying minutes (20 Score) to use the Cargobob!");
RemovePlayerFromVehicle(playerid);
else
//40 Score Aircraft
if(GetPlayerScore(playerid, < 40) && IsPlayerInVehicle(playerid, 577))
SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the AT-400!");
RemovePlayerFromVehicle(playerid);
else
if(GetPlayerScore(playerid, < 40) && IsPlayerInVehicle(playerid, 592))
SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Andromada!");
RemovePlayerFromVehicle(playerid);
else
if(GetPlayerScore(playerid, < 40) && IsPlayerInVehicle(playerid, 417))
SendClientMessage(playerid, COLOR_RED, "You need 40 flying minutes (40 Score) to use the Leviathan!");
RemovePlayerFromVehicle(playerid);
else
//60 Score Aircraft
if(GetPlayerScore(playerid, < 60) && IsPlayerInVehicle(playerid, 520))
SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hydra!");
RemovePlayerFromVehicle(playerid);
else
if(GetPlayerScore(playerid, < 60) && IsPlayerInVehicle(playerid, 592))
SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Rustler!");
RemovePlayerFromVehicle(playerid);
else
if(GetPlayerScore(playerid, < 60) && IsPlayerInVehicle(playerid, 425))
SendClientMessage(playerid, COLOR_RED, "You need 60 flying minutes (60 Score) to use the Hunter!");
RemovePlayerFromVehicle(playerid);
return 1;
}
Код:
C:\Documents and Settings\Ed\My Documents\SAMP Virtual Pilots\filterscripts\ScoreVehicle.pwn(34) : error 029: invalid expression, assumed zero C:\Documents and Settings\Ed\My Documents\SAMP Virtual Pilots\filterscripts\ScoreVehicle.pwn(34) : warning 215: expression has no effect C:\Documents and Settings\Ed\My Documents\SAMP Virtual Pilots\filterscripts\ScoreVehicle.pwn(34) : error 001: expected token: ";", but found ")" C:\Documents and Settings\Ed\My Documents\SAMP Virtual Pilots\filterscripts\ScoreVehicle.pwn(34) : error 029: invalid expression, assumed zero C:\Documents and Settings\Ed\My Documents\SAMP Virtual Pilots\filterscripts\ScoreVehicle.pwn(34) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.