Hesap Oluştur


Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5
NPC Editör

#1
[Resim: 1.jpg]
[Resim: 2.jpg]

Y Tuşu İle Açılır İşlem Bitince Tekrar Y Tuşuna Basılıp Ayarlar Kayıt Edilir Ve N Tuşuylada Çıkılır
Kod:
/* * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ## * * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE. * * Codigo Creado Por OTACON * * CREDITOS: * OTACON: Realizacion y Idea de creacion del code. * TÙ: Modificacion libremente respetando lo mencionado ;). * * NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;) * * Prohibido TOTALMENTE el Robo de Créditos o la * Publicación de este FILTERSCRIPT sin Mi Permiso.*//* * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ## * * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE. * * Code Created By OTACON * * CREDITS: * OTACON: Idea Making and code creation. * YOUR: Modification freely respecting the above ;). * * NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;) * * FULLY spaces Theft Credit or * Publication of this FILTERSCRIPT without my permission.*/
#include #include #include
#define MAX_NPC (1000)#define DIALOG_NPC (10)enum B_bots{    b_name[24],    b_mode, b_vehicle,    b_seat,    b_skin,    b_weapons,    Float:nPos[4],    b_actors,    id_actors,    b_descripction[24], Text3D:bText,    Float:b_armour,};new bDataBots[MAX_NPC][B_bots];
enum A_bots{    bool:EditorNPC,    bool:RecNPC,    bool:SaveNPC,    bool:SelectNPC,};new InfoDataBots[MAX_PLAYERS][A_bots],more_bots, select_bots;
COMMAND:npc(playerid, params[]){    new bData[1024];    strcat(bData,"{CB0000}INSTRUCTIONS OF USE:\n");    strcat(bData,"{FFE300}on the editor:\n {FFFFFF}press the key 'Y' to configure data npc and start the editor.\n");    strcat(bData,"{FFE300}recording the npc:\n {FFFFFF}once on the editor you press the button 'Y' to record the npc. \n");    strcat(bData,"{FFE300}finish recording:\n {FFFFFF}to end the active recording press the key 'N'to finish. \n"); strcat(bData,"{FFE300}off the editor:\n {FFFFFF}to turn off press the key editor 'C' to turn it off, doing this \n");    strcat(bData,"{FFFFFF}action will restart the editor and will create an file 'filterscript' \n");    strcat(bData,"{FFFFFF}with the data necessary to connect the npc's created. \n");    ShowPlayerDialog(playerid, DIALOG_NPC+2, DIALOG_STYLE_MSGBOX,\    "{FFE300}npc recording system.:", bData, "close", "more...");    return true;}
COMMAND:npcedit(playerid, params[]){    if(IsPlayerInAnyVehicle(playerid)){CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");\    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}You are in an vehicle, {FFE300}down vehicle for editing{FFFFFF}!.");}    if(InfoDataBots[playerid][RecNPC]){CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");\    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}You are recording an npc, {FFFFFF}to edit the recording ends{FFFFFF}!.");}    new bData[1024];    strcat(bData,"{FFE300}edit: {FFFFFF}text \n");    strcat(bData,"{FFE300}edit: {FFFFFF}armour \n");    strcat(bData,"{FFE300}edit: {FFFFFF}weapon \n");    strcat(bData,"{FFE300}edit: {FFFFFF}skin \n"); strcat(bData,"{FFE300}edit: {FFFFFF}vehicle \n");    strcat(bData,"{FFE300}select npc \n"); strcat(bData,"{FFFFFF}**coming soon* {FFDC00}reproduce \n");    ShowPlayerDialog(playerid, DIALOG_NPC+3, DIALOG_STYLE_TABLIST,\    "{FFE300}npc recording system.:", bData, "select", "cancel");    return true;}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){    new bData[1024],    bSeat, bModel,    bVehicle,    bSkin,    bWeapons,    Float:bPos[4],    Float:p_armour,    File:bDatas;    bSeat = GetPlayerVehicleSeat(playerid);    bVehicle = GetPlayerVehicleID(playerid);    bModel = GetVehicleModel(bVehicle);    bSkin = GetPlayerSkin(playerid);    bWeapons = GetPlayerWeapon(playerid);    GetPlayerArmour(playerid, p_armour);    if(newkeys & KEY_YES){ if(!InfoDataBots[playerid][EditorNPC]){    if(more_bots>=MAX_NPC-GetPlayerPoolSize())    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}You have already created too many npc, or there are enough users{FFFFFF}!.");
ShowPlayerDialog(playerid,DIALOG_NPC+0, DIALOG_STYLE_INPUT, "{FFE300}npc recording system.:", "\    {FFFFFF}INFO: Enter an name for the npc you will create next: \n\ {CB0000}NOTE: Do not go below 4, or go above 24 characters,", "accept", "cancel");    }else{ if(bDataBots[more_bots][b_mode]==PLAYER_RECORDING_TYPE_ONFOOT){ if(IsPlayerInAnyVehicle(playerid))    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}You have chosen recording mode {FFFFFF}walking, {FFE300}lower vehicle{FFFFFF}!.");    if(InfoDataBots[playerid][RecNPC])    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}You already recording an npc{FFFFFF}!.");    InfoDataBots[playerid][RecNPC] = true;    InfoDataBots[playerid][SaveNPC] = false;    InfoDataBots[playerid][SelectNPC] = false;    GetPlayerPos(playerid, bPos[0],bPos[1],bPos[2]);    GetPlayerFacingAngle(playerid, bPos[3]);    bDataBots[more_bots][nPos][0] = bPos[0];    bDataBots[more_bots][nPos][1] = bPos[1];    bDataBots[more_bots][nPos][2] = bPos[2];    bDataBots[more_bots][nPos][3] = bPos[3];    bDataBots[more_bots][b_skin] = bSkin;    bDataBots[more_bots][b_weapons] = bWeapons;    bDataBots[more_bots][b_armour] = p_armour;    bDataBots[more_bots][b_descripction][0] ='\0';    select_bots = 0; StartRecordingPlayerData(playerid,bDataBots[more_bots][b_mode],bDataBots[more_bots][b_name]);    format(bData,sizeof(bData),"{FFFFFF}INFO: {FFE300}recording the npc: {FFFFFF}%s [%d/%d], {00A700}started.", bDataBots[more_bots][b_name], more_bots, MAX_NPC-GetPlayerPoolSize()-GetPlayerPoolSize());    SendClientMessage(playerid,-1,bData); SendClientMessage(playerid,-1,"{FFDC00}NOTE: Now all your movements will be recorded for the npc{FFFFFF}!.");    }    else if(bDataBots[more_bots][b_mode]==PLAYER_RECORDING_TYPE_DRIVER){    if(!IsPlayerInAnyVehicle(playerid))    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}You have chosen recording mode {FFFFFF}in vehicle, {FFE300}board a nvehicle.{FFFFFF}!.");    if(InfoDataBots[playerid][RecNPC]) return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}You already recording an npc{FFFFFF}!.");    InfoDataBots[playerid][RecNPC] = true;    InfoDataBots[playerid][SaveNPC] = false;    InfoDataBots[playerid][SelectNPC] = false;    GetVehiclePos(bVehicle, bPos[0],bPos[1],bPos[2]);    GetVehicleZAngle(bVehicle, bPos[3]);    bDataBots[more_bots][nPos][0] = bPos[0];    bDataBots[more_bots][nPos][1] = bPos[1];    bDataBots[more_bots][nPos][2] = bPos[2];    bDataBots[more_bots][nPos][3] = bPos[3];    bDataBots[more_bots][b_vehicle] = bModel;    bDataBots[more_bots][b_seat] = bSeat;    bDataBots[more_bots][b_skin] = bSkin; bDataBots[more_bots][b_weapons] = bWeapons;    bDataBots[more_bots][b_armour] = p_armour;    bDataBots[more_bots][b_descripction][0] ='\0';    select_bots = 0; StartRecordingPlayerData(playerid,bDataBots[more_bots][b_mode],bDataBots[more_bots][b_name]);    format(bData,sizeof(bData),"{FFFFFF}INFO: {FFE300}recording the npc: {FFFFFF}%s [%d/%d], {00A700}started.", bDataBots[more_bots][b_name], more_bots, MAX_NPC-GetPlayerPoolSize());    SendClientMessage(playerid,-1,bData); SendClientMessage(playerid,-1,"{FFDC00}NOTE: Now all your movements will be recorded for the npc{FFFFFF}!.");    }    }    }    if(newkeys & KEY_NO){    if(InfoDataBots[playerid][EditorNPC]){ if(InfoDataBots[playerid][RecNPC]){    StopRecordingPlayerData(playerid); format(bData,sizeof(bData),"{FFFFFF}INFO: {FFE300}recording the npc: {FFFFFF}%s [%d/%d], {CB0000}finished.", bDataBots[more_bots][b_name], more_bots, MAX_NPC-GetPlayerPoolSize());    SendClientMessage(playerid,-1,bData);    InfoDataBots[playerid][RecNPC] = false;    InfoDataBots[playerid][EditorNPC] = false;    InfoDataBots[playerid][SaveNPC] = true; InfoDataBots[playerid][SelectNPC] = false; format(bData,sizeof(bData),"%s.pwn",bDataBots[more_bots][b_name]);    if(fexist(bData)) fremove(bData);    bDatas=fopen(bData, io_append);    if(bDatas){ format(bData,sizeof(bData),"\r\n#define RECORDING \"%s\"\r\n",bDataBots[more_bots][b_name]);    fwrite(bDatas, bData);    format(bData,sizeof(bData),"#define RECORDING_TYPE (%d)\r\n\r\n",bDataBots[more_bots][b_mode]);    fwrite(bDatas, bData);    fwrite(bDatas, " #include \r\n");    fwrite(bDatas, " main(){}\r\n");    fwrite(bDatas, " public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);\r\n\r\n");    fwrite(bDatas, " #if RECORDING_TYPE == 1\r\n");    fwrite(bDatas, " public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);\r\n");    fwrite(bDatas, " public OnNPCExitVehicle() StopRecordingPlayback();\r\n");    fwrite(bDatas, " #else\r\n");    fwrite(bDatas, " public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);\r\n");    fwrite(bDatas, " #endif\r\n");    fclose(bDatas);    }    bDataBots[more_bots][id_actors] = CreateObject(18631, bDataBots[more_bots][nPos][0],bDataBots[more_bots][nPos][1],bDataBots[more_bots][nPos][2],0,0,0);    new asd[10];    if(bDataBots[more_bots][b_mode]==PLAYER_RECORDING_TYPE_ONFOOT) asd="actor",\    bDataBots[more_bots][b_actors] = CreateActor(bDataBots[more_bots][b_skin], bDataBots[more_bots][nPos][0],bDataBots[more_bots][nPos][1],bDataBots[more_bots][nPos][2], bDataBots[more_bots][nPos][3]);    else if(bDataBots[more_bots][b_mode]==PLAYER_RECORDING_TYPE_DRIVER) asd="vehicle",\    bDataBots[more_bots][b_actors] = CreateVehicle(bDataBots[more_bots][b_vehicle], bDataBots[more_bots][nPos][0],bDataBots[more_bots][nPos][1],bDataBots[more_bots][nPos][2], bDataBots[more_bots][nPos][3],random(200),random(200),99999);
format(bData,sizeof(bData),"{FFFFFF}INFO: {FFDC00}it has created an '{FFFFFF}%s' {FFDC00}to simulate the initial position of npc recorded{FFFFFF}!.", asd); SendClientMessage(playerid,-1,bData);    format(bData,sizeof(bData),"{FFFFFF}INFO: {FFE300}number of NPC created so far: {FFFFFF}[%d/%d].", more_bots, MAX_NPC-GetPlayerPoolSize());    SendClientMessage(playerid,-1,bData);    }    }    }    if(newkeys & KEY_CROUCH){    if(!InfoDataBots[playerid][EditorNPC]){    if(InfoDataBots[playerid][SaveNPC]){ if(more_bots == 0)    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFDC00}You have not saved any npc, so far{FFFFFF}!.");
format(bData,sizeof(bData),"%s.pwn","filterscripts_NPC");    if(fexist(bData)) fremove(bData); bDatas=fopen(bData, io_append);    if(bDatas){    fwrite(bDatas, " // npc recording system. - By OTACON //\r\n");    fwrite(bDatas, "#include \r\n\r\n");    for(new bSlots=1; bSlots=4 && strlen(bDataBots[bSlots][b_descripction])<=24){    format(bData,sizeof(bData),"new Text3D:bText_%s[MAX_PLAYERS]; \r\n", bDataBots[bSlots][b_name]);    fwrite(bDatas, bData); }    }    fwrite(bDatas, "\r\n");    fwrite(bDatas, "public OnFilterScriptInit(){\r\n"); format(bData,sizeof(bData),"    SendRconCommand(\"maxnpc %d\"); \r\n", more_bots+1); fwrite(bDatas, bData);    for(new bSlots=1; bSlots=4 && strlen(bDataBots[bSlots][b_descripction])<=24){    format(bData,sizeof(bData)," Delete3DTextLabel(bText_%s[playerid]); \r\n", bDataBots[bSlots][b_name]);    fwrite(bDatas, bData);    format(bData,sizeof(bData),"    bText_%s[playerid] = Create3DTextLabel(\"_\",-1, %f,%f,%f,10,-1,0);); \r\n", bDataBots[bSlots][b_name], bDataBots[bSlots][nPos][0],bDataBots[bSlots][nPos][1],bDataBots[bSlots][nPos][2]);    fwrite(bDatas, bData); format(bData,sizeof(bData),"    Attach3DTextLabelToPlayer(bText_%s[playerid], playerid, 0.0, 0.0, 0.2); \r\n", bDataBots[bSlots][b_name]);    fwrite(bDatas, bData); format(bData,sizeof(bData),"    Update3DTextLabelText(bText_%s[playerid], -1, \"%s\"); \r\n", bDataBots[bSlots][b_name], bDataBots[bSlots][b_descripction]);    fwrite(bDatas, bData);    } if(bDataBots[bSlots][b_armour]>0.0){    format(bData,sizeof(bData)," SetPlayerArmour(playerid, %f); \r\n", bDataBots[bSlots][b_armour]);    fwrite(bDatas, bData); }    format(bData,sizeof(bData),"    SetPlayerSkin(playerid, %d); \r\n", bDataBots[bSlots][b_skin]);    fwrite(bDatas, bData);    if(bDataBots[bSlots][b_weapons]>0){ format(bData,sizeof(bData),"    GivePlayerWeapon(playerid, %d, 99999); \r\n", bDataBots[bSlots][b_weapons]);    fwrite(bDatas, bData);    }    if(bDataBots[bSlots][b_mode]==PLAYER_RECORDING_TYPE_ONFOOT){    format(bData,sizeof(bData)," SetPlayerPos(playerid, %f,%f,%f); \r\n", bDataBots[bSlots][nPos][0],bDataBots[bSlots][nPos][1],bDataBots[bSlots][nPos][2]);    fwrite(bDatas, bData);    format(bData,sizeof(bData)," SetPlayerFacingAngle(playerid, %f); \r\n", bDataBots[bSlots][nPos][3]);    fwrite(bDatas, bData);    }    if(bDataBots[bSlots][b_mode]==PLAYER_RECORDING_TYPE_DRIVER){ format(bData,sizeof(bData),"    PutPlayerInVehicle(playerid, bVehicle_%s, %d); \r\n", bDataBots[bSlots][b_name], bDataBots[bSlots][b_seat]);    fwrite(bDatas, bData);    } fwrite(bDatas, "    }\r\n");    }    fwrite(bDatas, "    }\r\n");    fwrite(bDatas, "    return true;\r\n"); fwrite(bDatas, "}\r\n");    fwrite(bDatas, " // npc recording system. - By OTACON //\r\n"); fclose(bDatas);
for(new bSlots=1; bSlots    SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}npc recording system., {CB0000}off{FFFFFF}!.");    SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}npc recording system., {FFFFFF}restarted{FFFFFF}!."); CallLocalFunction("OnPlayerCommandText","is",playerid,"/npc");    }    }    }    } return true;}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){    new bData[300], Float:bPos[4],    bWeapon[32],    bTexto[24]; switch(dialogid){ case DIALOG_NPC+0:{ if(response){    if(!sscanf(inputtext, "s[24]", bTexto)){    if(strlen(bTexto)>=4 && strlen(bTexto)<=24){    more_bots++;    format(bDataBots[more_bots][b_name],24,"%s",bTexto); format(bData,sizeof(bData),"{FFFFFF}INFO: {FFE300}you have established the name: {FFFFFF}%s {FFE300}for npc: {FFFFFF}%d.", bDataBots[more_bots][b_name], more_bots); SendClientMessage(playerid,-1,bData);    SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}Now select how you engrave the npc{FFFFFF}!.");
ShowPlayerDialog(playerid,DIALOG_NPC+1, DIALOG_STYLE_MSGBOX, "{FFE300}npc recording system.:", "\    {FFFFFF}INFO: Now select how you engrave the npc: ", "on foot", "on vehicle"); }else{    ShowPlayerDialog(playerid,DIALOG_NPC+0, DIALOG_STYLE_INPUT, "{FFE300}npc recording system.:", "\    {FFFFFF}INFO: Enter an name for the npc you will create next: \n\ {CB0000}NOTE: Do not go below 4, or go above 24 characters,", "accept", "cancel");    }    }else{ ShowPlayerDialog(playerid,DIALOG_NPC+0, DIALOG_STYLE_INPUT, "{FFE300}npc recording system.:", "\    {FFFFFF}INFO: Enter an name for the npc you will create next: \n\ {CB0000}NOTE: Do not go below 4, or go above 24 characters,", "accept", "cancel");    }    }else CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");    }    case DIALOG_NPC+1:{ if(response){    bDataBots[more_bots][b_mode] = PLAYER_RECORDING_TYPE_ONFOOT; InfoDataBots[playerid][EditorNPC] = true;    SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}you have set the recording mode {FFFFFF}walking."); SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}npc recording system., {00A700}on{FFFFFF}!.");    }else{    bDataBots[more_bots][b_mode] = PLAYER_RECORDING_TYPE_DRIVER;    InfoDataBots[playerid][EditorNPC] = true; SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}you have set the recording mode {FFFFFF}in vehicle.");    SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}npc recording system., {00A700}on{FFFFFF}!.");    }    }    case DIALOG_NPC+2:{    if(!response) CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");    }
case DIALOG_NPC+3:{    if(response){    switch(listitem){    case 0:{    if(select_bots == 0){CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");\    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}You have not selected any npc recorded so far{FFFFFF}!.");}    if(bDataBots[select_bots][b_mode]==PLAYER_RECORDING_TYPE_DRIVER){CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");\    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}This NPC is not recorded on foot{FFFFFF}!.");}    ShowPlayerDialog(playerid,DIALOG_NPC+4, DIALOG_STYLE_INPUT, "{FFE300}npc recording system.:", "\    {FFFFFF}INFO: Write an short description for the selected recorded npc: \n\    {CB0000}NOTE: Do not go below 4, or go above 24 characters,", "accept", "cancel");    }    case 1:{    if(select_bots == 0){CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");\    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}You have not selected any npc recorded so far{FFFFFF}!.");}    if(bDataBots[select_bots][b_mode]==PLAYER_RECORDING_TYPE_DRIVER){CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");\    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}This NPC is not recorded on foot{FFFFFF}!.");}    if(bDataBots[select_bots][b_armour]>0.0) format(bData,sizeof(bData),"{FFFFFF}INFO: status armour: {00A700}yes armour.{FFFFFF}");    else format(bData,sizeof(bData),"{FFFFFF}INFO: status armour: {CB0000}not armour.{FFFFFF}"); ShowPlayerDialog(playerid,DIALOG_NPC+5, DIALOG_STYLE_MSGBOX, "{FFE300}npc recording system.:", bData, "accept", "cancel");    }    case 2:{    if(select_bots == 0){CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");\    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}You have not selected any npc recorded so far{FFFFFF}!.");}    if(bDataBots[select_bots][b_mode]==PLAYER_RECORDING_TYPE_DRIVER){CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");\    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}This NPC is not recorded on foot{FFFFFF}!.");}    GetWeaponName(bDataBots[select_bots][b_weapons], bWeapon, sizeof(bWeapon));    format(bData,sizeof(bData),"{FFFFFF}\n\t\t * displaying weapons: [ %s ] \n\n\    \t\t{FFE300}>>: select your preferred option: \n\    option - weapons '>>' \n\    option - weapons '<<' \n\    option - weapons 'random' \n", bWeapon);    ShowPlayerDialog(playerid, DIALOG_NPC+6, DIALOG_STYLE_LIST, "{FFE300}npc recording system.:", bData, "select", "finish");    }    case 3:{    if(select_bots == 0){CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");\    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}You have not selected any npc recorded so far{FFFFFF}!.");}    if(bDataBots[select_bots][b_mode]==PLAYER_RECORDING_TYPE_DRIVER){CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");\    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}This NPC is not recorded on foot{FFFFFF}!.");}    format(bData,sizeof(bData),"{FFFFFF}\n\t\t * displaying clothing: [ %d / 311 ] \n\n\    \t\t{FFE300}>>: select your preferred option: \n\    option - clothing '>>' \n\    option - clothing '<<' \n\    option - clothing 'random' \n",bDataBots[select_bots][b_skin]); ShowPlayerDialog(playerid, DIALOG_NPC+7, DIALOG_STYLE_LIST, "{FFE300}npc recording system.:", bData, "select", "finish");    }    case 4:{    if(select_bots == 0){CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");\    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}You have not selected any npc recorded, {FFFFFF}!.");}    if(bDataBots[select_bots][b_mode]==PLAYER_RECORDING_TYPE_ONFOOT){CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");\    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}This NPC is not recorded in vehicle{FFFFFF}!.");}
format(bData,sizeof(bData),"{FFFFFF}\n\t\t * displaying vehicle: [ %d / 609 ] \n\n\ \t\t{FFE300}>>: select your preferred option: \n\    option - vehicle '>>' \n\    option - vehicle '<<' \n\    option - vehicle 'random' \n",bDataBots[select_bots][b_vehicle]); ShowPlayerDialog(playerid, DIALOG_NPC+8, DIALOG_STYLE_LIST, "{FFE300}npc recording system.:", bData, "select", "finish");    }    case 5:{    if(more_bots == 0){CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");\    return SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFDC00}You have not saved any npc, so far{FFFFFF}!.");}
InfoDataBots[playerid][SelectNPC] = true;    SelectObject(playerid); SendClientMessage(playerid,-1,"{FFFFFF}INFO: {FFE300}Now select an npc for editing{FFFFFF}!.");    SendClientMessage(playerid,-1,"{FFDC00}NOTE: To change the camera when you're in edit mode,");    SendClientMessage(playerid,-1,"{FFDC00}Keep the 'TAB' key and moving the 'mouse' to change!.");    }    case 6: CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");    }    }else CallLocalFunction("OnPlayerCommandText","is",playerid,"/npc");    }
case DIALOG_NPC+4:{    if(response){    if(!sscanf(inputtext, "s[24]", bTexto)){ if(strlen(bTexto)>=4 && strlen(bTexto)<=24){    format(bDataBots[select_bots][b_descripction],24,"%s",bTexto);    Delete3DTextLabel(bDataBots[select_bots][bText]); bDataBots[select_bots][bText] = Create3DTextLabel(\"_",-1, bDataBots[select_bots][nPos][0],bDataBots[select_bots][nPos][1],bDataBots[select_bots][nPos][2],10,-1,0); Update3DTextLabelText(bDataBots[select_bots][bText], -1, bDataBots[select_bots][b_name]); format(bData,sizeof(bData),"{FFFFFF}INFO: {FFDC00}text of the description: {FFFFFF}'%s' for the {FFFFFF}'npc id:%d'FFFFFF}!.", bDataBots[select_bots][b_descripction],select_bots); SendClientMessage(playerid,-1,bData); CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");    }else{ ShowPlayerDialog(playerid,DIALOG_NPC+4, DIALOG_STYLE_INPUT, "{FFE300}npc recording system.:", "\    {FFFFFF}INFO: Write an short description for the selected recorded npc: \n\ {CB0000}NOTE: Do not go below 4, or go above 24 characters,", "accept", "cancel");    }    }else{ ShowPlayerDialog(playerid,DIALOG_NPC+4, DIALOG_STYLE_INPUT, "{FFE300}npc recording system.:", "\    {FFFFFF}INFO: Write an short description for the selected recorded npc: \n\ {CB0000}NOTE: Do not go below 4, or go above 24 characters,", "accept", "cancel");    }    }else CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");    }    case DIALOG_NPC+5:{ if(response){    if(bDataBots[select_bots][b_armour]<=0.0) bDataBots[select_bots][b_armour] = 100.0;    else bDataBots[select_bots][b_armour] = 0.0;
if(bDataBots[select_bots][b_armour]>0.0) format(bData,sizeof(bData),"{FFFFFF}INFO: status armour: {00A700}yes armour.{FFFFFF}");    else format(bData,sizeof(bData),"{FFFFFF}INFO: status armour: {CB0000}not armour.{FFFFFF}");    ShowPlayerDialog(playerid,DIALOG_NPC+5, DIALOG_STYLE_MSGBOX, "{FFE300}npc recording system.:", bData, "accept", "cancel");    }else CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");    }    case DIALOG_NPC+6:{ if(response){    switch(listitem){    case 0..2: CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");    case 3:{ bDataBots[select_bots][b_weapons]++;    switch(bDataBots[select_bots][b_weapons]){    case 19,20,21: bDataBots[select_bots][b_weapons] = 22;    }    }    case 4:{    bDataBots[select_bots][b_weapons]--;    switch(bDataBots[select_bots][b_weapons]){    case 19,20,21: bDataBots[select_bots][b_weapons] = 18;    }    }    case 5:{    new rand = random(46);    switch(rand){    case 0..46:{    switch(rand){    case 19,20,21: bDataBots[select_bots][b_weapons] = 22; default: bDataBots[select_bots][b_weapons] = rand;    }    }    }    }    }    if(bDataBots[select_bots][b_weapons]>=46) bDataBots[select_bots][b_weapons] = 46;    else if(bDataBots[select_bots][b_weapons]<=0) bDataBots[select_bots][b_weapons] = 0; GetWeaponName(bDataBots[select_bots][b_weapons], bWeapon, sizeof(bWeapon)); format(bData,sizeof(bData),"{FFFFFF}\n\t\t * displaying weapons: [ %s ] \n\n\ \t\t{FFE300}>>: select your preferred option: \n\    option - weapons '>>' \n\    option - weapons '<<' \n\    option - weapons 'random' \n", bWeapon);    ShowPlayerDialog(playerid, DIALOG_NPC+6, DIALOG_STYLE_LIST, "{FFE300}npc recording system.:", bData, "select", "finish");    }else CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");    }    case DIALOG_NPC+7:{    if(response){    switch(listitem){    case 0..2: CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");    case 3: bDataBots[select_bots][b_skin]++;    case 4: bDataBots[select_bots][b_skin]--;    case 5: bDataBots[select_bots][b_skin]=random(311);    }    if(bDataBots[select_bots][b_skin]>=311) bDataBots[select_bots][b_skin] = 311;    else if(bDataBots[select_bots][b_skin]<=0) bDataBots[select_bots][b_skin] = 0;
GetActorPos(bDataBots[select_bots][b_actors], bPos[0],bPos[1],bPos[2]); GetActorFacingAngle(bDataBots[select_bots][b_actors], bPos[3]); DestroyActor(bDataBots[select_bots][b_actors]);    bDataBots[select_bots][b_actors] = CreateActor(bDataBots[select_bots][b_skin], bPos[0],bPos[1],bPos[2],bPos[3]); format(bData,sizeof(bData),"{FFFFFF}\n\t\t * displaying clothing: [ %d / 311 ] \n\n\ \t\t{FFE300}>>: select your preferred option: \n\    option - clothing '>>' \n\    option - clothing '<<' \n\    option - clothing 'random' \n",bDataBots[select_bots][b_skin]); ShowPlayerDialog(playerid, DIALOG_NPC+7, DIALOG_STYLE_LIST, "{FFE300}npc recording system.:", bData, "select", "finish");    }else CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");    }    case DIALOG_NPC+8:{ if(response){    switch(listitem){    case 0..2: CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");    case 3: bDataBots[select_bots][b_vehicle]++;    case 4: bDataBots[select_bots][b_vehicle]--;    case 5:{ new rand = random(610);    switch(rand){    case 400..609: bDataBots[select_bots][b_vehicle] = rand;    }    }    }    if(bDataBots[select_bots][b_vehicle]>=609) bDataBots[select_bots][b_vehicle] = 609;    else if(bDataBots[select_bots][b_vehicle]<=400) bDataBots[select_bots][b_vehicle] = 400;    GetVehiclePos(bDataBots[select_bots][b_actors], bPos[0],bPos[1],bPos[2]); GetVehicleZAngle(bDataBots[select_bots][b_actors], bPos[3]); DestroyVehicle(bDataBots[select_bots][b_actors]);    bDataBots[select_bots][b_actors] = CreateVehicle(bDataBots[select_bots][b_vehicle], bPos[0],bPos[1],bPos[2],bPos[3],random(200),random(200),99999); format(bData,sizeof(bData),"{FFFFFF}\n\t\t * displaying vehicle: [ %d / 609 ] \n\n\ \t\t{FFE300}>>: select your preferred option: \n\    option - vehicle '>>' \n\    option - vehicle '<<' \n\    option - vehicle 'random' \n",bDataBots[select_bots][b_vehicle]); ShowPlayerDialog(playerid, DIALOG_NPC+8, DIALOG_STYLE_LIST, "{FFE300}npc recording system.:", bData, "select", "finish");    }else CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");    }    }    return false;}
public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ){ new bData[200];    if(type==SELECT_OBJECT_GLOBAL_OBJECT){    if(InfoDataBots[playerid][SelectNPC]){    select_bots = objectid;    CancelEdit(playerid);    InfoDataBots[playerid][SelectNPC] = false;    format(bData,sizeof(bData),"{FFFFFF}INFO: {FFDC00}You have selected to {FFFFFF}npc id:%d' {FFDC00}for editing{FFFFFF}!.", select_bots); SendClientMessage(playerid,-1,bData); CallLocalFunction("OnPlayerCommandText","is",playerid,"/npcedit");    }    }    return true;}

EFSANE YENİDEN
Cevapla



Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
Soru MTA San Andreas Map Editör'den GTA San Andreas'a Geçirme Yeah 8 580 19.08.2013, Saat: 01:18
Son Yorum: Cruzers
  Samp Map Editör EFS@NE 7 1,307 29.01.2013, Saat: 11:02
Son Yorum: Lbıg

Hızlı Menü:


Konuyu Okuyanlar:
1 Ziyaretçi

Mc_cEzA Modifiye © 2010 - 2020 - Her Hakkı Saklıdır.