07.09.2013, 05:22
Hey!
This is my neon system:
The problem is, when i am doing /neon its says "Unknown Command"...
So... why is it happening?
This is my neon system:
Код:
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////System Neon v0.1//////////////////////////////// //////////////////////////////////////////////////////////////////////////////// #include <a_samp> #include <streamer> #include <a_zones> #include <foreach> #include <yom_buttons> #include <progress> #include <YSI\y_timers> #include <ZCMD> #include <sscanf2> #include <audio> #include <dini> #define COLOR_GRAD1 0xB4B5B7FF //////////////////////////////////////////////////////////////////////////////// enum pInfo { pAdmin, pDonateRank, }; new PlayerInfo[MAX_PLAYERS+1][pInfo]; new neon1[MAX_VEHICLES],neon2[MAX_VEHICLES]; forward LoadCarsFiles(); new carfile[256]; public OnFilterScriptInit() { print("\n--------------------------------------"); print(" System Neon v1.0 "); print("--------------------------------------\n"); SetTimer("LoadCarsFiles",1000,0); return 1; } //////////////////////////////////////////////////////////////////////////////// public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/Neon", true)) { if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pDonateRank] >= 1) { if(!IsPlayerInAnyVehicle(playerid)) return ShowPlayerDialog(playerid, 8_0, DIALOG_STYLE_MSGBOX, "{FF0000} Warning!", "{99FFFF} You aren't in vehicle", "Continue", "Cancel"); ShowPlayerDialog(playerid,1995, DIALOG_STYLE_LIST, "{99FFFF} Neons System", "Blue\nRed\nGreen\nYellow\nPink\nWhite\nTurn Off\nTurn On\nDelete", "Choose", ""); PlayerPlaySound(playerid,1056,0.0,0.0,0.0); } else { SendClientMessage(playerid, COLOR_GRAD1, "Neon System is able to admins and V.I.P Only!"); } return 1; } return 0; } //////////////////////////////////////////////////////////////////////////////// public OnVehicleSpawn(vehicleid) { if(dini_Int(GetFile(vehicleid),"HaveNeon") == 1) { if(dini_Int(GetFile(vehicleid),"ColorNeon") == 1) { neon1[vehicleid] = CreateObject(18648,0.0,0.0,0.0,0.0,0.0,0.0); neon2[vehicleid] = CreateObject(18648,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[vehicleid],vehicleid,-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[vehicleid],vehicleid ,0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(dini_Int(GetFile(vehicleid),"ColorNeon") == 2) { DestroyObject(neon1[vehicleid]); DestroyObject(neon2[vehicleid]); neon1[vehicleid] = CreateObject(18647,0.0,0.0,0.0,0.0,0.0,0.0); neon2[vehicleid] = CreateObject(18647,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[vehicleid],vehicleid,-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[vehicleid],vehicleid,0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(dini_Int(GetFile(vehicleid),"ColorNeon") == 3) { DestroyObject(neon1[vehicleid]); DestroyObject(neon2[vehicleid]); neon1[vehicleid] = CreateObject(18649,0.0,0.0,0.0,0.0,0.0,0.0); neon2[vehicleid] = CreateObject(18649,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[vehicleid],vehicleid,-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[vehicleid],vehicleid,0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(dini_Int(GetFile(vehicleid),"ColorNeon") == 4) { DestroyObject(neon1[vehicleid]); DestroyObject(neon2[vehicleid]); neon1[vehicleid] = CreateObject(18650,0.0,0.0,0.0,0.0,0.0,0.0); neon2[vehicleid] = CreateObject(18650,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[vehicleid],vehicleid,-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[vehicleid],vehicleid,0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(dini_Int(GetFile(vehicleid),"ColorNeon") == 5) { DestroyObject(neon1[vehicleid]); DestroyObject(neon2[vehicleid]); neon1[vehicleid] = CreateObject(18651,0.0,0.0,0.0,0.0,0.0,0.0); neon2[vehicleid] = CreateObject(18651,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[vehicleid],vehicleid,-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[vehicleid],vehicleid,0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(dini_Int(GetFile(vehicleid),"ColorNeon") == 6) { DestroyObject(neon1[vehicleid]); DestroyObject(neon2[vehicleid]); neon1[vehicleid] = CreateObject(18652,0.0,0.0,0.0,0.0,0.0,0.0); neon2[vehicleid] = CreateObject(18652,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[vehicleid],vehicleid,-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[vehicleid],vehicleid,0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } } return 1; } //////////////////////////////////////////////////////////////////////////////// public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1995) { if(!response) return 1; switch(listitem) { case 0: { PlayerPlaySound(playerid,1056,0.0,0.0,0.0); if(!IsPlayerInAnyVehicle(playerid)) return ShowPlayerDialog(playerid, 111, DIALOG_STYLE_MSGBOX, "{FF0000} Warning!", "{99FFFF}You are not in a vehicle", "Continue", "Cancel"); if(GetPlayerMoney(playerid) < 100) return ShowPlayerDialog(playerid, 112, DIALOG_STYLE_MSGBOX, "{FF0000} Warning!", "{99FFFF} You dont have enough money", "Continue", "Cancel"); if(dini_Int(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon") == 1) return ShowPlayerDialog(playerid, 113, DIALOG_STYLE_MSGBOX, "{FF0000} Warning!", "{99FFFF} There is neon in this vehicle", "Continue", "Cancel"); dini_IntSet(GetFile(GetPlayerVehicleID(playerid)),"ColorNeon",1); dini_IntSet(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon",1); GivePlayerMoney(playerid,-100); neon1[GetPlayerVehicleID(playerid)] = CreateObject(18648,0.0,0.0,0.0,0.0,0.0,0.0); neon2[GetPlayerVehicleID(playerid)] = CreateObject(18648,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid,0xFFFFFAA,"{99FFFF} • You Bought neon to your vehicle"); } case 1: { PlayerPlaySound(playerid,1056,0.0,0.0,0.0); if(!IsPlayerInAnyVehicle(playerid)) return ShowPlayerDialog(playerid, 111, DIALOG_STYLE_MSGBOX, "{FF0000} Warning!", "{99FFFF} You are not in a vehicle", "Continue", "Cancel"); if(GetPlayerMoney(playerid) < 100) return ShowPlayerDialog(playerid, 112, DIALOG_STYLE_MSGBOX, "{FF0000} Warning!", "{99FFFF} You dont have enough money", "Continue", "Cancel"); if(dini_Int(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon") == 1) return ShowPlayerDialog(playerid, 113, DIALOG_STYLE_MSGBOX, "Warning!", "{99FFFF} There is neon in this vehicle", "Continue", "Cancel"); dini_IntSet(GetFile(GetPlayerVehicleID(playerid)),"ColorNeon",2); dini_IntSet(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon",1); GivePlayerMoney(playerid,-100); neon1[GetPlayerVehicleID(playerid)] = CreateObject(18647,0.0,0.0,0.0,0.0,0.0,0.0); neon2[GetPlayerVehicleID(playerid)] = CreateObject(18647,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid,0xFFFFFAA,"{99FFFF} • You Bought neon to your vehicle"); } case 2: { PlayerPlaySound(playerid,1056,0.0,0.0,0.0); if(!IsPlayerInAnyVehicle(playerid)) return ShowPlayerDialog(playerid,111,DIALOG_STYLE_MSGBOX,"{FF0000} Warning!","{99FFFF} You are not in a vehicle","OK",""); if(GetPlayerMoney(playerid) < 100) return ShowPlayerDialog(playerid,112,DIALOG_STYLE_MSGBOX,"{FF0000} Warning!","{99FFFF} You dont have enough money","OK",""); if(dini_Int(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon") == 1) return ShowPlayerDialog(playerid, 113, DIALOG_STYLE_MSGBOX, "{FF0000} Warning!", "{99FFFF} There is neon in this vehicle", "Continue", "Cancel"); dini_IntSet(GetFile(GetPlayerVehicleID(playerid)),"ColorNeon",3); dini_IntSet(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon",1); GivePlayerMoney(playerid,-100); neon1[GetPlayerVehicleID(playerid)] = CreateObject(18649,0.0,0.0,0.0,0.0,0.0,0.0); neon2[GetPlayerVehicleID(playerid)] = CreateObject(18649,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid,0xFFFFFAA,"{99FFFF} • You Bought neon to your vehicle"); } case 3: { PlayerPlaySound(playerid,1056,0.0,0.0,0.0); if(!IsPlayerInAnyVehicle(playerid)) return ShowPlayerDialog(playerid,111,DIALOG_STYLE_MSGBOX,"{FF0000} Warning!","{99FFFF} You are not in a vehicle","OK",""); if(GetPlayerMoney(playerid) < 100) return ShowPlayerDialog(playerid,112,DIALOG_STYLE_MSGBOX,"{FF0000} Warning!","{99FFFF} You dont have enough money","OK",""); if(dini_Int(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon") == 1) return ShowPlayerDialog(playerid, 113, DIALOG_STYLE_MSGBOX, "{FF0000} Warning!", "{99FFFF} There is neon in this vehicle", "Continue", "Cancel"); dini_IntSet(GetFile(GetPlayerVehicleID(playerid)),"ColorNeon",4); dini_IntSet(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon",1); GivePlayerMoney(playerid,-100); neon1[GetPlayerVehicleID(playerid)] = CreateObject(18650,0.0,0.0,0.0,0.0,0.0,0.0); neon2[GetPlayerVehicleID(playerid)] = CreateObject(18650,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid,0xFFFFFAA,"{99FFFF} • You Bought neon to your vehicle"); } case 4: { PlayerPlaySound(playerid,1056,0.0,0.0,0.0); if(!IsPlayerInAnyVehicle(playerid)) return ShowPlayerDialog(playerid,111,DIALOG_STYLE_MSGBOX,"{FF0000} Warning!","{99FFFF} You are not in a vehicle","OK",""); if(GetPlayerMoney(playerid) < 100) return ShowPlayerDialog(playerid,112,DIALOG_STYLE_MSGBOX,"{FF0000} Warning!","{99FFFF} You dont have enough money","OK",""); if(dini_Int(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon") == 1) return ShowPlayerDialog(playerid, 113, DIALOG_STYLE_MSGBOX, "{FF0000} Warning!", "{99FFFF} There is neon in this vehicle", "Continue", "Cancel"); dini_IntSet(GetFile(GetPlayerVehicleID(playerid)),"ColorNeon",5); dini_IntSet(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon",1); GivePlayerMoney(playerid,-100); neon1[GetPlayerVehicleID(playerid)] = CreateObject(18651,0.0,0.0,0.0,0.0,0.0,0.0); neon2[GetPlayerVehicleID(playerid)] = CreateObject(18651,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid,0xFFFFFAA,"{99FFFF} • You Bought neon to your vehicle"); } case 5: { PlayerPlaySound(playerid,1056,0.0,0.0,0.0); if(!IsPlayerInAnyVehicle(playerid)) return ShowPlayerDialog(playerid,111,DIALOG_STYLE_MSGBOX,"{FF0000} Warning!","{99FFFF} You are not in a vehicle","OK",""); if(GetPlayerMoney(playerid) < 100) return ShowPlayerDialog(playerid,112,DIALOG_STYLE_MSGBOX,"{FF0000} Warning!","{99FFFF} You dont have enough money","OK",""); if(dini_Int(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon") == 1) return ShowPlayerDialog(playerid, 113, DIALOG_STYLE_MSGBOX, "{FF0000}Warning!", "{99FFFF} There is neon in this vehicle", "Continue", "Cancel"); dini_IntSet(GetFile(GetPlayerVehicleID(playerid)),"ColorNeon",6); dini_IntSet(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon",1); GivePlayerMoney(playerid,-100); neon1[GetPlayerVehicleID(playerid)] = CreateObject(18652,0.0,0.0,0.0,0.0,0.0,0.0); neon2[GetPlayerVehicleID(playerid)] = CreateObject(18652,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid,0xFFFFFAA,"{99FFFF} • You Bought neon to your vehicle"); } case 6: { DestroyObject(neon1[GetPlayerVehicleID(playerid)]); DestroyObject(neon2[GetPlayerVehicleID(playerid)]); PlayerPlaySound(playerid,1056,0.0,0.0,0.0); SendClientMessage(playerid,0xFFFFFAA,"{99FFFF} • You turned off the neon"); } case 7: { if(dini_Int(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon") == 0) return ShowPlayerDialog(playerid, 113, DIALOG_STYLE_MSGBOX, "{FF0000} Warning!", "{99FFFF} In This vehicle there isn't neon", "Continue", "Cancel"); if(dini_Int(GetFile(GetPlayerVehicleID(playerid)),"ColorNeon") == 1) { neon1[GetPlayerVehicleID(playerid)] = CreateObject(18648,0.0,0.0,0.0,0.0,0.0,0.0); neon2[GetPlayerVehicleID(playerid)] = CreateObject(18648,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid) ,0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(dini_Int(GetFile(GetPlayerVehicleID(playerid)),"ColorNeon") == 2) { DestroyObject(neon1[GetPlayerVehicleID(playerid)]); DestroyObject(neon2[GetPlayerVehicleID(playerid)]); neon1[GetPlayerVehicleID(playerid)] = CreateObject(18647,0.0,0.0,0.0,0.0,0.0,0.0); neon2[GetPlayerVehicleID(playerid)] = CreateObject(18647,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(dini_Int(GetFile(GetPlayerVehicleID(playerid)),"ColorNeon") == 3) { DestroyObject(neon1[GetPlayerVehicleID(playerid)]); DestroyObject(neon2[GetPlayerVehicleID(playerid)]); neon1[GetPlayerVehicleID(playerid)] = CreateObject(18649,0.0,0.0,0.0,0.0,0.0,0.0); neon2[GetPlayerVehicleID(playerid)] = CreateObject(18649,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(dini_Int(GetFile(GetPlayerVehicleID(playerid)),"ColorNeon") == 4) { DestroyObject(neon1[GetPlayerVehicleID(playerid)]); DestroyObject(neon2[GetPlayerVehicleID(playerid)]); neon1[GetPlayerVehicleID(playerid)] = CreateObject(18650,0.0,0.0,0.0,0.0,0.0,0.0); neon2[GetPlayerVehicleID(playerid)] = CreateObject(18650,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(dini_Int(GetFile(GetPlayerVehicleID(playerid)),"ColorNeon") == 5) { DestroyObject(neon1[GetPlayerVehicleID(playerid)]); DestroyObject(neon2[GetPlayerVehicleID(playerid)]); neon1[GetPlayerVehicleID(playerid)] = CreateObject(18651,0.0,0.0,0.0,0.0,0.0,0.0); neon2[GetPlayerVehicleID(playerid)] = CreateObject(18651,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(dini_Int(GetFile(GetPlayerVehicleID(playerid)),"ColorNeon") == 6) { DestroyObject(neon1[GetPlayerVehicleID(playerid)]); DestroyObject(neon2[GetPlayerVehicleID(playerid)]); neon1[GetPlayerVehicleID(playerid)] = CreateObject(18652,0.0,0.0,0.0,0.0,0.0,0.0); neon2[GetPlayerVehicleID(playerid)] = CreateObject(18652,0.0,0.0,0.0,0.0,0.0,0.0); AttachObjectToVehicle(neon1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } PlayerPlaySound(playerid,1056,0.0,0.0,0.0); SendClientMessage(playerid,0xFFFFFAA,"{99FFFF} • You have turned on the neon"); } case 8: { DestroyObject(neon1[GetPlayerVehicleID(playerid)]); DestroyObject(neon2[GetPlayerVehicleID(playerid)]); PlayerPlaySound(playerid,1056,0.0,0.0,0.0); dini_IntSet(GetFile(GetPlayerVehicleID(playerid)),"HaveNeon",0); SendClientMessage(playerid,0xFFFFFAA,"{99FFFF} • You have delete the neon"); } } } return 1; } //////////////////////////////////////////////////////////////////////////////// stock GetFile(vehicleid) { new file[256]; format(file, sizeof(file), "Neon/Users/%d.ini", vehicleid); return file; } //////////////////////////////////////////////////////////////////////////////// public LoadCarsFiles() { new VCount = CreateVehicle(411, 0, 0, 0, 0, 0, 0, -1); DestroyVehicle(VCount); for(new v=1; v<VCount; v++) { format(carfile, sizeof(carfile), "Neon/Users/%d.ini", v); if(!dini_Exists(carfile)) { dini_Create(carfile); dini_IntSet(carfile, "Model", GetVehicleModel(v)); dini_IntSet(carfile, "HaveNeon", 0); dini_IntSet(carfile, "ColorNeon", -1); } } return 1; } //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////System Neon v0.1//////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
So... why is it happening?