06.11.2013, 17:07
pawn Код:
new CarsNames[400][] = {
{"NRG-500"},{"BUS"},{"PRIMO"},{"WILLARD"},{"PIZZABOY"},{"MAJESTIC"},{"CABBIE"},
{"FORTUNE"},{"BMX"},{"PCJ-600"},{"TAXI"},{"SOLAIR"},{"JESTER"},{"FLASH"},{"BOBCAT"},
{"FREEWAY"},{"ZR-350"},{"COACH"},{"CLUB"},{"COMET"},{"BF-400"},{"HPV1000"},{"BULLET"},
{"HUSTLER"},{"FCR-900"},{"PREMIER"},{"HOTRING"},{"BUFFALU"},{"DUMPER"},{"MANANA"},
{"VOODOO"},{"CHEETAH"},{"HUNTER"},{"RHINO"},{"HOTKNIFE"},{"RUMPO"},{"TOPFUN"},
{"MONSTER"},{"TURISMO"},{"SPEEDER"},{"REEFER"},{"CADDY"},{"FAGGIO"},{"HOTDOG"},
{"ROADTRAIN"},{"TRACTOR"},{"SLAMVAN"},{"BLADE"},{"VORTEX"},{"CLOVER"},{"MOWER"},
{"BOXVILLE"},{"PHOENIX"},{"ALPHA"},{"S.W.A.T"},{"DODO"},{"AT400"},{"TUG"},{"NEWSVAN"},
{"DFT-30"},{"SWEEPER"},{"KART"},{"BANSITO"},{""},{"SAVANNA"},{"TAHOMA"},{"ELEGY"},
{"SULTAN"},{"WINDSOR"},{"NEVADA"},{"TAMPA"},{"FIRE TRUCK"},{"FORKLIFT"},{"FBI TRUCK"},
{"TANKER"},{"BIKE"},{"SUPER GT"},{"HOTRING RACER"},{"MESA"},{"SANDKING"},{"JETMAX"},
{"GREENWOOD"},{"VIRGO"},{"DOZER"},{"CAMPER"},{"WALTON"},{"RUSTLER"},{"SABRE"},
{"HERMES"},{"QUAD"},{"PATRIOT"},{"SPARROW"},{"SANCHEZ"},{"SKIMMER"},{"YANKEE"},{"FLATBED"},
{"TROPIC"},{"TRAM"},{"SEASPARROW"},{"SQUALLO"},{"ADMIRAL"},{"PACKER"},{"ROMERO"},
{"MR WHOOPEE"},{"MOONBEAM"},{"AMBULANCE"},{"PONY"},{"INFERNUS"},{"STRETCH"},{"TRASHMASTER"},
{"SENTINEL"},{"PERENNIEL"},{"LINERUNNER"},{"BRAVURA"},{"LANDSTALKER"},{"ESPERANTO"},
{"BF INJECTION"},{"ENFORCER"},{"SECURICAR"},{"BANSHEE"},{"BARRACKS"},{"ARTICLE TRAILER"},
{"STALLION"},{"ARTICLE TRAILER 2"},{"GLENDALE"},{"OCEANIC"},{"COASTGUARD"},{"DINGHY"},
{"REGINA"},{"MARQUIS"},{"BAGGAGE"},{"MAVERICK"},{"RANCHER"},{"FBI RANCHER"},{"BLOODRING BANGER"},
{"ELEGANT"},{"JOURNEY"},{"MOUNTAIN BIKE"},{"CROPDUSTER"},{"STUNTPLANE"},{"NEBULA"},
{"BUCCANEER"},{"SHAMAL"},{"HYDRA"},{"CEMENT TRUCK"},{"TOWTRUCK"},{"CADRONA"},{"COMBINE HARVESTER"},
{"REMINGTON"},{"VINCENT"},{"INTRUDER"},{"CARGOBOB"},{"UTILITY VAN"},{"NEVADA"},
{"YOSEMITE"},{"MONSTER A"},{"MONSTER B"},{"URANUS"},{"STRATUM"},{"RAINDANCE"},
{"BROADWAY"},{"TORNADO"},{"HUNTLEY"},{"STAFFORD"},{"PETROL TRAILER"},{"EMPEROR"},
{"WAYFARER"},{"EUROS"},{"FREIGHT BOX"},{"ARTICLE TRAILER 3"},{"ANDROMADA"},
{"LAUNCH"},{"POLICE CAR"},{"POLICE RANGER"},{"PICADOR"},{"GLEDALE SHIT"},{"SADLER SHIT"},
{"BAGGAGE TRAILER A"},{"BAGGAGE TRAILER B"},{"TUG STAIRS TRAILER"},{"FARM TRAILER"},
{"UTILITY TRAILER"}
};
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if((newstate==PLAYER_STATE_DRIVER)||(newstate==PLAYER_STATE_PASSENGER))
{
new CarsNames = GetPlayerVehicleID(playerid);
new Model = (GetVehicleModel(vehicleid))-400;
new str[50];
format(str,sizeof (str),"%s",CarsNames[model]);
GameTextForPlayer(playerid, str, 5000, 1);
} return 1;
}
pawn Код:
C:\Users\John\Desktop\Server\gamemodes\FristGM.pwn(354) : warning 219: local variable "CarsNames" shadows a variable at a preceding level
C:\Users\John\Desktop\Server\gamemodes\FristGM.pwn(355) : error 017: undefined symbol "vehicleid"
C:\Users\John\Desktop\Server\gamemodes\FristGM.pwn(357) : error 028: invalid subscript (not an array or too many subscripts): "CarsNames"
C:\Users\John\Desktop\Server\gamemodes\FristGM.pwn(357) : error 017: undefined symbol "model"
C:\Users\John\Desktop\Server\gamemodes\FristGM.pwn(357) : error 029: invalid expression, assumed zero
C:\Users\John\Desktop\Server\gamemodes\FristGM.pwn(357) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase