21.04.2012, 03:35
Im creating my neon cmd, i have a question is this correct
i keep getting this error
Код:
CMD:neon(playerid, params[]) { if(PlayerInfo[playerid][pJob] == 7 || PlayerInfo[playerid][pJob2] == 7) { if(IsPlayerInAnyVehicle(playerid)) { if(IsInvalidNeonVehicle(vehicleid)) { if(PlayerInfo[playerid][pCash] < 2000) ShowPlayerDialog(playerid, 101, DIALOG_STYLE_LIST, "Neon", "Red\nBlue\nGreen\nYellow\nPink\nWhite", "Mod", "Cancel"); } else { SendClientMessageEx( playerid, COLOR_WHITE, "You are not a Mechanic!" ); } } else { SendClientMessageEx(playerid, COLOR_WHITE, "You're not in a vehicle."); } } else { SendClientMessageEx(playerid, COLOR_WHITE, "Neon cannot be installed in this vehicle."); } } else { SendClientMessageEx(playerid, COLOR_WHITE, "You don't have enough money." ); } return 1; }
Код:
stock IsInvalidNeonVehicle(vehicleid) { switch(GetVehicleModel(vehicleid)) { case 403, 406..408, 414, 416, 417, 423, 425, 427, 428, 430..433, 435, 437, 441, 443, 446..450, 452..456, 460..465, 468..473, 476, 478, 481..490, 493, 497, 498, 499, 501, 504, 505, 507..517, 519..526, 528..532, 537..539, 542..544, 546..549, 551..557, 561, 563, 564, 568..574, 577, 578, 581..586, 588, 590..597, 599..602, 604..611: return 1; } return 0; }
Код:
forward AddVehicleNeon(playerid, vehicleid, neon); public AddVehicleNeon(playerid, vehicleid, neon) { new string[128]; if(IsValidObject(Neon[vehicleid])) { DestroyObject(Neon[vehicleid]); Neon[vehicleid] = 0; } if(IsValidObject(Neon2[vehicleid])) { DestroyObject(Neon2[vehicleid]); Neon2[vehicleid] = 0; } if(IsValidObject(Neon3[vehicleid])) { DestroyObject(Neon3[vehicleid]); Neon3[vehicleid] = 0; } if(IsValidObject(Neon4[vehicleid])) { DestroyObject(Neon4[vehicleid]); Neon4[vehicleid] = 0; } PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-2000; GivePlayerMoney(playerid,-2000); PlayerPlaySound(playerid,1133,0.0,0.0,0.0); format(string, sizeof(string), "%s added neon to the vehicle.", GetPlayerNameEx(playerid)); else format(string, sizeof(string), "%s modifies the vehicle with neon.", GetPlayerNameEx(playerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); Neon[vehicleid] = CreateObject(neon, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); Neon2[vehicleid] = CreateObject(neon, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); if(GetVehicleModel(vehicleid) == 409) { Neon3[vehicleid] = CreateObject(neon, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); Neon4[vehicleid] = CreateObject(neon, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); } switch (GetVehicleModel(vehicleid)) { case 400: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.9, 0.0, -0.8, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.9, 0.0, -0.8, 0.0, 0.0, 0.0); } case 401: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.9, 0.0, -0.6, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.9, 0.0, -0.6, 0.0, 0.0, 0.0); } case 402: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.92, 0.0, -0.7, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.92, 0.0, -0.7, 0.0, 0.0, 0.0); } case 404, 466, 467: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0); } case 405, 442: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.7, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.7, 0.0, 0.0, 0.0); } case 409: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 1.0, -0.6, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 1.0, -0.6, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon3[vehicleid], vehicleid, 0.8, -1.0, -0.6, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon4[vehicleid], vehicleid, -0.8, -1.0, -0.6, 0.0, 0.0, 0.0); } case 410, 560: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.5, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.5, 0.0, 0.0, 0.0); } case 411, 412, 415, 419, 458, 474: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.65, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.65, 0.0, 0.0, 0.0); } case 413: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.85, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.85, 0.0, 0.0, 0.0); } case 418: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.9, 0.0, -0.95, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.9, 0.0, -0.95, 0.0, 0.0, 0.0); } case 420, 426, 429, 436: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.9, 0.0, -0.55, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.9, 0.0, -0.55, 0.0, 0.0, 0.0); } case 421, 422: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.9, 0.0, -0.7, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.9, 0.0, -0.7, 0.0, 0.0, 0.0); } case 424: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.85, 0.0, -0.5, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.85, 0.0, -0.5, 0.0, 0.0, 0.0); } case 434: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.6, 0.0, -0.75, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.6, 0.0, -0.75, 0.0, 0.0, 0.0); } case 438, 439: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.9, 0.0, -0.75, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.9, 0.0, -0.75, 0.0, 0.0, 0.0); } case 440: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -1.0, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -1.0, 0.0, 0.0, 0.0); } case 444: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.9, 0.0, 0.0, 0.0, 0.0, 0.0); } case 445, 451, 475: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.6, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.6, 0.0, 0.0, 0.0); } case 457: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.55, 0.0, -0.4, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.55, 0.0, -0.4, 0.0, 0.0, 0.0); } case 459: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.8, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.8, 0.0, 0.0, 0.0); } case 477, 480, 579, 580: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.6, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.6, 0.0, 0.0, 0.0); } case 479, 541, 559, 565, 576, 598: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.5, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.5, 0.0, 0.0, 0.0); } case 491, 534..536, 545, 587: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.65, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.65, 0.0, 0.0, 0.0); } case 494, 502, 503, 540, 603: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.7, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.7, 0.0, 0.0, 0.0); } case 495: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.9, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.9, 0.0, 0.0, 0.0); } case 496, 518, 533, 566: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.55, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.55, 0.0, 0.0, 0.0); } case 500: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.2, -0.6, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.2, -0.6, 0.0, 0.0, 0.0); } case 506: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, -0.2, -0.55, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, -0.2, -0.55, 0.0, 0.0, 0.0); } case 527: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.2, -0.5, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.2, -0.5, 0.0, 0.0, 0.0); } case 550: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, -0.2, -0.7, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, -0.2, -0.7, 0.0, 0.0, 0.0); } case 558, 589: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.45, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.45, 0.0, 0.0, 0.0); } case 562: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.1, -0.5, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.1, -0.5, 0.0, 0.0, 0.0); } case 567: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.2, -0.7, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.2, -0.7, 0.0, 0.0, 0.0); } case 575: { AttachObjectToVehicle(Neon[vehicleid], vehicleid, 0.8, 0.0, -0.4, 0.0, 0.0, 0.0); AttachObjectToVehicle(Neon2[vehicleid], vehicleid, -0.8, 0.0, -0.4, 0.0, 0.0, 0.0); } } return 1; }
Код:
C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(3259) : error 029: invalid expression, assumed zero C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(36940) : error 017: undefined symbol "vehicleid" C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(36956) : error 010: invalid function or declaration C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(36958) : error 021: symbol already defined: "SendClientMessageEx" C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(36960) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.