Код:
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;
}
i get this error now C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(3252) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NRRP.pwn(36943) : 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(36959) : 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(36961) : 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(36963) : error 010: invalid function or declaration