CMD:jarmuvek(playerid){new name[MAX_PLAYER_NAME]; for(new i = 0; i < MAX_VEHICLES; i++){if(!strcmp(name, VehicleInfo[vTulaj])){ SendClientMessage(playerid, COLOR_ORANGE, \"(( Nincs jármûved! ))\");}else{ ShowPlayerDialog(playerid, DIALOG_KULCS, DIALOG_STYLE_LIST, \"Jármûvek\", \"asd\", \"Kiválaszt\", \"Kilép\");}}return 1;}
#include <a_samp>#include <zcmd>#define COLOR_ORANGE 0xFFFF00AA#define DIALOG_KULCS 1enum pAdat{vID1,vID2,vTulaj};new PlayerInfo[MAX_PLAYERS][pAdat];CMD:jarmuvek(playerid){if(PlayerInfo[playerid][vTulaj]==0){ SendClientMessage(playerid, COLOR_ORANGE, \"(( Nincs jármûved! ))\"); }else{ ShowPlayerDialog(playerid, DIALOG_KULCS, DIALOG_STYLE_LIST, \"Jármûvek\", \"Infernus\\nMég egy\", \"Kiválaszt\", \"Kilép\"); } return 1;}CMD:van(playerid){ PlayerInfo[playerid][vTulaj]=1;return 1;}CMD:inf1(playerid){ PlayerInfo[playerid][vID1]=411; SendClientMessage(playerid, COLOR_ORANGE, \"Lehivtad 1. jármûved!\");return 1;}CMD:inf2(playerid){ PlayerInfo[playerid][vID1]=411; SendClientMessage(playerid, COLOR_ORANGE, \"Lehivtad 2. jármûved!\");return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(dialogid == DIALOG_KULCS && response) { switch(listitem) {case 0:{new Float:PlayerPos[4]; GetPlayerPos(playerid, PlayerPos[0], PlayerPos[1], PlayerPos[2]); GetPlayerFacingAngle(playerid, PlayerPos[3]); CreateVehicle(PlayerInfo[playerid][vID], PlayerPos[0], PlayerPos[1], PlayerPos[2], PlayerPos[3], 0, 3, 120);}case 1:{new Float:PlayerPos[4]; GetPlayerPos(playerid, PlayerPos[0], PlayerPos[1], PlayerPos[2]); GetPlayerFacingAngle(playerid, PlayerPos[3]); CreateVehicle(PlayerInfo[playerid][vID], PlayerPos[0], PlayerPos[1], PlayerPos[2], PlayerPos[3], 3, 0, 120);} } } return 1;}
CMD:jarmuvek(playerid){new name[MAX_PLAYER_NAME],bool:nemiszerv = false; for(new i = 0; i < MAX_VEHICLES; i++){if(!strcmp(name, VehicleInfo[vTulaj])){ nemiszerv=false;}else{ nemiszerv=true;}} if(nemiszerv == true) return ShowPlayerDialog(playerid, DIALOG_KULCS, DIALOG_STYLE_LIST, \"Jármûvek\", \"asd\", \"Kiválaszt\", \"Kilép\"); if(nemiszerv == false) return SendClientMessage(playerid, COLOR_ORANGE, \"(( Nincs jármûved! ))\");return 1;}
CMD:jarmuvek(playerid){ new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); // ezt hagytad ki for(new i = 0; i < MAX_VEHICLES; i++) { if(!strcmp(name, VehicleInfo[vTulaj])) { SendClientMessage(playerid, COLOR_ORANGE, \"(( Nincs jármûved! ))\"); } else { ShowPlayerDialog(playerid, DIALOG_KULCS, DIALOG_STYLE_LIST, \"Jármûvek\", \"asd\", \"Kiválaszt\", \"Kilép\"); } } return 1;}
CMD:jarmuvek(playerid){ new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); // ezt hagytad ki for(new i = 0; i < MAX_VEHICLES; i++) { if(!strcmp(name, VehicleInfo[vTulaj])) { SendClientMessage(playerid, COLOR_ORANGE, \"(( Nincs jármûved! ))\"); } else { ShowPlayerDialog(playerid, DIALOG_KULCS, DIALOG_STYLE_LIST, \"Jármûvek\", \"asd\", \"Kiválaszt\", \"Kilép\"); } } return 1;} [mod]Javítottam a taget tagre![/mod]
CMD:jarmuvek(playerid){ new name[MAX_PLAYER_NAME]; new mennyikocsi = MAX_VEHICLES; GetPlayerName(playerid, name, MAX_PLAYER_NAME); // ezt hagytad ki for(new i = 0; i < MAX_VEHICLES; i++) { if(!strcmp(name, VehicleInfo[vTulaj])) { mennyikocsi --; } else { ShowPlayerDialog(playerid, DIALOG_KULCS, DIALOG_STYLE_LIST, \"Jármûvek\", \"asd\", \"Kiválaszt\", \"Kilép\"); } } if(mennyikocsi == 0) return SendClientMessage(playerid, -1, \"(( Nincs jármûved! ))\"); return 1;}
if(vankocsi[playerid]==1){}else{SendClientMessage(playerid, COLOR_ORANGE, \"(( Nincs jármûved! ))\");}
ShowPlayerDialog(playerid, DIALOG_KULCS, DIALOG_STYLE_LIST, \"Jármûvek\", \"asd\", \"Kiválaszt\", \"Kilép\");public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if(dialogid == DIALOG_KULCS{ switch(listitem){ case 0:{ new Float:PlayerPos[4]; GetPlayerPos(playerid, PlayerPos[0], PlayerPos[1], PlayerPos[2]); GetPlayerFacingAngle(playerid, PlayerPos[3]); CreateVehicle(Jarmu[playerid], PlayerPos[0], PlayerPos[1], PlayerPos[2], PlayerPos[3], szin1, szin2, 120); /*azt itt meg lehivod abba a pozicióba ahol vagy az a kocsit ameik a tied*/ }