CMD:createhouse( playerid, params[] ){ new iPrice, iStyle, szHouseName[ 64 + 1 ], szFormat[ 100 + 1 ], Float: fPos[ 3 ]; if( sscanf( params, \"iis[65]\", iStyle, iPrice, szHouseName ) ) return SendClientMessage( playerid, 0xFF0000AA, \"Használat: /createhouse <Ház Stílus(1-10)> <Ár> <Név>\" ); if( iPrice < 10000 || iPrice > 100000000 ) return SendClientMessage( playerid, 0xFF0000AA, \"HIBA: A ház ára csak $10000 és $1000000000 között lehet! \" ); switch( iStyle ) { case 1: { hID = hID + 1; GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] ); CreateHouse( hID, szHouseName, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ], 235.508994, 1189.169897, 1080.339966, 3, iPrice, 1 ); format( szFormat, sizeof( szFormat ), \"Ház létrehozva! HázID: %d, Ár: $%d, Név: %s.\", hID, iPrice, szHouseName ); SendClientMessage( playerid, -1, szFormat ); } case 2: { hID = hID + 1; GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] ); CreateHouse( hID, szHouseName, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ], 225.756989, 1240.000000, 1082.149902, 2, iPrice, 1 ); format( szFormat, sizeof( szFormat ), \"Ház létrehozva! HázID: %d, Ár: $%d, Név: %s.\", hID, iPrice, szHouseName ); SendClientMessage( playerid, -1, szFormat ); } case 3: { hID = hID + 1; GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] ); CreateHouse( hID, szHouseName, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ], 223.043991, 1289.259888, 1082.199951, 1, iPrice, 1 ); format( szFormat, sizeof( szFormat ), \"Ház létrehozva! HázID: %d, Ár: $%d, Név: %s.\", hID, iPrice, szHouseName ); SendClientMessage( playerid, -1, szFormat ); } case 4: { hID = hID + 1; GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] ); CreateHouse( hID, szHouseName, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ], 225.630997, 1022.479980, 1084.069946, 7, iPrice, 1 ); format( szFormat, sizeof( szFormat ), \"Ház létrehozva! HázID: %d, Ár: $%d, Név: %s.\", hID, iPrice, szHouseName ); SendClientMessage( playerid, -1, szFormat ); } case 5: { hID = hID + 1; GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] ); CreateHouse( hID, szHouseName, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ], 295.138977, 1474.469971, 1080.519897, 15, iPrice, 1 ); format( szFormat, sizeof( szFormat ), \"Ház létrehozva! HázID: %d, Ár: $%d, Név: %s.\", hID, iPrice, szHouseName ); SendClientMessage( playerid, -1, szFormat ); } case 6: { hID = hID + 1; GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] ); CreateHouse( hID, szHouseName, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ], 328.493988, 1480.589966, 1084.449951, 15, iPrice, 1 ); format( szFormat, sizeof( szFormat ), \"Ház létrehozva! HázID: %d, Ár: $%d, Név: %s.\", hID, iPrice, szHouseName ); SendClientMessage( playerid, -1, szFormat ); } case 7: { hID = hID + 1; GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] ); CreateHouse( hID, szHouseName, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ], 385.803986, 1471.769897, 1080.209961, 15, iPrice, 1 ); format( szFormat, sizeof( szFormat ), \"Ház létrehozva! HázID: %d, Ár: $%d, Név: %s.\", hID, iPrice, szHouseName ); SendClientMessage( playerid, -1, szFormat ); } case 8: { hID = hID + 1; GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] ); CreateHouse( hID, szHouseName, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ], 2324.419921, -1145.568359, 1050.710083, 12, iPrice, 1 ); format( szFormat, sizeof( szFormat ), \"Ház létrehozva! HázID: %d, Ár: $%d, Név: %s.\", hID, iPrice, szHouseName ); SendClientMessage( playerid, -1, szFormat ); } case 9: { hID = hID + 1; GetPlayerPos( playerid, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ] ); CreateHouse( hID, szHouseName, fPos[ 0 ], fPos[ 1 ], fPos[ 2 ], 271.884979, 306.631988, 999.148437, 2, iPrice, 1 ); format( szFormat, sizeof( szFormat ), \"Ház létrehozva! HázID: %d, Ár: $%d, Név: %s.\", hID, iPrice, szHouseName ); SendClientMessage( playerid, -1, szFormat ); } } return 1;}stock CreateHouse( ID, const szName[ ], Float:fOutX, Float:fOutY, Float:fOutZ, Float:fInX, Float:fInY, Float:fInZ, iInterior, iPrice, iSell ){ new szLabelString[ 60 + 1 ]; PropInfo[ ID ] [ PropOwnerRegID ] = -1; PropInfo[ ID ] [ OutX ] = fOutX; PropInfo[ ID ] [ OutY ] = fOutY; PropInfo[ ID ] [ OutZ ] = fOutZ; PropInfo[ ID ] [ InX ] = fInX; PropInfo[ ID ] [ InY ] = fInY; PropInfo[ ID ] [ InZ ] = fInZ; PropInfo[ ID ] [ PropInterior ] = iInterior; PropInfo[ ID ] [ PropPrice ] = iPrice; PropInfo[ ID ] [ PropLocked ] = 1; PropInfo[ ID ] [ PropSell ] = iSell; strcat( PropInfo[ ID ][ PropOwner ], \"Senki\", 64 ); strcat( PropInfo[ ID ][ PropName ], szName, MAX_PLAYER_NAME ); format( szLabelString, sizeof( szLabelString ), \"Név: %s\\nTulajdonos: %s\", PropInfo[ ID ] [ PropName ], PropInfo[ ID ] [ PropOwner ] ); PropInfo[ ID ] [ PropPickup ] = CreateDynamicPickup( 1273, 23, PropInfo[ ID ] [ OutX ], PropInfo[ ID ] [ OutY ], PropInfo[ ID ] [ OutZ ], -1, -1, -1 ); PropInfo[ ID ] [ PropMapIcon ] = CreateDynamicMapIcon( PropInfo[ ID ] [ OutX ], PropInfo[ ID ] [ OutY ], PropInfo[ ID ] [ OutZ ], 31, 0, -1, -1, -1, 250.0 ); PropInfo[ ID ] [ PropLabel ] = CreateDynamic3DTextLabel( szLabelString, 0xFF0000AA, PropInfo[ ID ] [ OutX ], PropInfo[ ID ] [ OutY ], PropInfo[ ID ] [ OutZ ], 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0 ); format( file, sizeof( file ), \"Houses/%d.ini\", ID ); dini_Create( file ); dini_IntSet( file, \"Haz ID\", ID ); dini_Set( file, \"Haz Nev\", PropInfo[ ID ] [ PropName ] ); dini_Set( file, \"Haz Tulajdonos\", PropInfo[ ID ] [ PropOwner ] ); dini_IntSet( file, \"Haz Tulajdonos RegID\", PropInfo[ ID ] [ PropOwnerRegID ] ); dini_IntSet( file, \"Haz Elado/Lakott\", PropInfo[ ID ] [ PropSell ] ); dini_FloatSet( file, \"Haz OutX\", PropInfo[ ID ] [ OutX ] ); dini_FloatSet( file, \"Haz OutY\", PropInfo[ ID ] [ OutY ] ); dini_FloatSet( file, \"Haz OutZ\", PropInfo[ ID ] [ OutZ ] ); dini_FloatSet( file, \"Haz InX\", PropInfo[ ID ] [ InX ] ); dini_FloatSet( file, \"Haz InX\", PropInfo[ ID ] [ InY ] ); dini_FloatSet( file, \"Haz InX\", PropInfo[ ID ] [ InZ ] ); dini_IntSet( file, \"Haz Interior\", PropInfo[ ID ] [ PropInterior ] ); dini_IntSet( file, \"Haz Ar\", PropInfo[ ID ] [ PropPrice ] ); dini_IntSet( file, \"Haz Nyitott/Zart\", PropInfo[ ID ] [ PropLocked ] ); return 1;}
if( sscanf( params, \"D(1)D(100000)s[65]\", iStyle, iPrice, szHouseName ) ) return SendClientMessage( playerid, 0xFF0000AA, \"Használat: /createhouse <Ház Stílus(1-10)> <Ár> <Név>\" );