Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new NeonInfo[MAX_VEHICLES][4];
- public OnVehicleSpawn(vehicleid)
- {
- DisVehicleNeon(vehicleid);
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- DisVehicleNeon(vehicleid);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/тюн неон", cmdtext, true, 10) == 0)
- {
- new neoncol=strtok(cmdtext,idx); // и прочая такая фигня...
- if(GetPlayerMoney(playerid)<5000)return SendClientMessage(playerid,COLOR_RED,"Надо $5.000");
- if(!neoncolor||neoncolor>6)return SendClientMessage(playerid,COLOR_WHITE,"Цвета неона: 1 - белый, 2 - красный, 3 - синий, 4 - зеленый, 5 - желтый, 6 - розовый");
- SetVehicleNeon(GetPlayerVehicleID(playerid),neoncol);
- GivePlayerMoney(playerid,-5000);
- return 1;
- }
- return 0;
- }
- stock SetVehicleNeon(vehicleid,color){
- new colormodel;
- switch(color){
- case 1:colormodel = 18652; // белый
- case 2:colormodel = 18647; // красный
- case 3:colormodel = 18648; // синий
- case 4:colormodel = 18649; // зелёный
- case 5:colormodel = 18650; // жёлтый
- case 6:colormodel = 18651; // розовый
- default:{
- if(IsVehicleNeon(vehicleid)){
- DisVehicleNeon(vehicleid);
- return -1;
- }else return 0;
- }
- }
- DestroyObject(NeonInfo[vehicleid][0]);
- DestroyObject(NeonInfo[vehicleid][1]);
- DestroyObject(NeonInfo[vehicleid][2]);
- DestroyObject(NeonInfo[vehicleid][3]);
- NeonInfo[vehicleid][0] = CreateObject(colormodel,0,0,0,0,0,0,200);
- NeonInfo[vehicleid][1] = CreateObject(colormodel,0,0,0,0,0,0,200);
- NeonInfo[vehicleid][2] = CreateObject(colormodel,0,0,0,0,0,0,200);
- NeonInfo[vehicleid][3] = CreateObject(colormodel,0,0,0,0,0,0,200);
- AttachObjectToVehicle(NeonInfo[vehicleid][0],vehicleid, 1,0.1,-0.5,0,0,0);
- AttachObjectToVehicle(NeonInfo[vehicleid][1],vehicleid,-1,0.1,-0.5,0,0,0);
- AttachObjectToVehicle(NeonInfo[vehicleid][2],vehicleid, 0, 2.1,-0.5,0,0,90);
- AttachObjectToVehicle(NeonInfo[vehicleid][3],vehicleid, 0,-2.1,-0.5,0,0,90);
- return 1;
- }
- stock DisVehicleNeon(vehicleid){
- DestroyObject(NeonInfo[vehicleid][0]);
- DestroyObject(NeonInfo[vehicleid][1]);
- DestroyObject(NeonInfo[vehicleid][2]);
- DestroyObject(NeonInfo[vehicleid][3]);
- NeonInfo[vehicleid][0] = -1;
- NeonInfo[vehicleid][1] = -1;
- NeonInfo[vehicleid][2] = -1;
- NeonInfo[vehicleid][3] = -1;
- return true;
- }
- // by RAIDER | Skype: ru.raider
Add Comment
Please, Sign In to add comment