#include #include #define COLOR_PURPLE 0xC790EEFF#define DIALOG_TELE 7000#pragma tabsize 0enum TP { Float: tX, Float: tY, Float: tZ, Float: tZA, Int, SCMTA[128]};new Teleportok[][TP] ={ { 0.0,0.0,0.0,0.0,0, \"Teleport 1\" }, // Ezt a sort módosítod { 0.0,0.0,0.0,0.0,0, \"Teleport 2\"}};CMD:t(playerid, params[]){new DialogString[1024], rC; rC = random(2); format( DialogString, 1024 , \"\" ); switch(rC) { case 0: { for( new i; i < sizeof( Teleportok ); i ++ ) { format( DialogString, sizeof( DialogString ), \"%s\\n{F70431}%s\" ,DialogString, Teleportok[ i ][ SCMTA ] ); } ShowPlayerDialog( playerid , DIALOG_TELE , DIALOG_STYLE_LIST , \"Teleportok listája\", DialogString , \"Teleport!\" , \"Maradok!\" ); } case 1: { for( new i; i < sizeof( Teleportok ); i ++ ) { format( DialogString, sizeof( DialogString ), \"%s\\n{39F704}%s\" ,DialogString, Teleportok[ i ][ SCMTA ] ); } ShowPlayerDialog( playerid , DIALOG_TELE , DIALOG_STYLE_LIST , \"Teleportok listája\", DialogString , \"Teleport!\" , \"Maradok!\" ); } }return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ if( dialogid == DIALOG_TELE ) {if( response ) { new JN[MAX_PLAYER_NAME], FSTRING[128]; GetPlayerName(playerid,JN,sizeof(JN)); if( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) { new idxveh = GetPlayerVehicleID( playerid ); SetVehiclePos( idxveh, Teleportok[listitem][tX], Teleportok[listitem][tY], Teleportok[listitem][tZ]); SetVehicleZAngle( idxveh, Teleportok[listitem][tZA]); } else { SetPlayerPos( playerid,Teleportok[listitem][tX], Teleportok[listitem][tY], Teleportok[listitem][tZ]); SetPlayerFacingAngle( playerid, Teleportok[listitem][tZA]); } format(FSTRING,sizeof(FSTRING), \"[Teleport]: %s elment ide: %s\", JN, Teleportok[listitem][sCMTA]); SendClientMessageToAll( COLOR_PURPLE, FSTRING ); } }return 0;}
{ 0.0,0.0,0.0,0.0,0, \"Teleport 1\" }, <|-- Eredeti sorSegéd:{ X POZÍCIÓ,Y POZÍCIÓ,Z POZÍCIÓ,FORDULÁSI SZÖG, INTERIOR, \"Teleport neve\" },Példa:{ 1526.0808,-1649.1783,13.0412,180.2365,0, \"Los Santos\" },{ 1944.5790,-2252.5217,13.2042,178.1524 ,0, \"Los Santos Reptér\"},
case 0: { for( new i; i < sizeof( Teleportok ); i ++ ) { format( DialogString, sizeof( DialogString ), \"%s\\n{F70431}%s\" ,DialogString, Teleportok[ i ][ SCMTA ] ); } ShowPlayerDialog( playerid , DIALOG_TELE , DIALOG_STYLE_LIST , \"Teleportok listája\", DialogString , \"Teleport!\" , \"Maradok!\" ); } case 1: { for( new i; i < sizeof( Teleportok ); i ++ ) { format( DialogString, sizeof( DialogString ), \"%s\\n{39F704}%s\" ,DialogString, Teleportok[ i ][ SCMTA ] ); } ShowPlayerDialog( playerid , DIALOG_TELE , DIALOG_STYLE_LIST , \"Teleportok listája\", DialogString , \"Teleport!\" , \"Maradok!\" ); }
CMD:t(playerid, params[]){new DialogString[1024],color[7];color = (random(2))?(\"F70431\")\"39F704\");for(new i; i < sizeof(Teleportok); i++ ){format(DialogString, sizeof DialogString, \"%s\\n{%s}%s\", DialogString, color, Teleportok[sCMTA] ); }ShowPlayerDialog(playerid, DIALOG_TELE, DIALOG_STYLE_LIST, \"Teleportok listája\", DialogString, \"Teleport!\", \"Maradok!\");return 1;}
stockot használtam de látom ez is egy jó megoldás.. viszont mySQL adabázisból könyebb a betöltés.. [/quote]Az is egy megoldás. Lehet megcsinálom, ha valakinek szüksége van rá.
f***a lett, felhasználom [/quote]köszönöm!
Jaj ez a dns fiú visszatér Újrakezdésnek jóez [/quote]puszillak :3