Jump to content
  • 0

intrebare mysql


WiDuAlK

Question

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

mcmd:ah( playerid, params[] )
{
if( !IsPlayerAdmin( playerid ) )
   return true;
 
new
HouseCost
;
if( sscanf( params, "i", HouseCost ) )
   return SendUsage( playerid, "/createhouse [Cost]" );
 
if( HouseCost < 200 || HouseCost > 2000 )
   return SendError( playerid, "Invalid Value! Only values between 100 and 2.000 coins!" );
 
new
Float:X,
Float:Y,
Float:Z
;
 
GetPlayerPos( playerid, X, Y, Z );
 
format( gsQuery, 512, "INSERT INTO `Houses` VALUES(0,'Nobody',%d,%d,0,1,0.00,0.00,0.00,%.2f,%.2f,%.2f,0,0.00,0.00,0.00,0)", HouseCost, HouseCost / 2, X, Y, Z );
mysql_tquery( g_Handle, gsQuery, "", "" );
 
HouseIntID = cache_insert_id( );
 
    SetGVarString( "h_Owner", "Nobody", HouseIntID );
SetGVarInt( "h_Cost", HouseCost, HouseIntID );
    SetGVarInt( "h_Sell", HouseCost / 2, HouseIntID );
    SetGVarInt( "h_Interior", 0, HouseIntID );
    SetGVarInt( "h_Locked", 1, HouseIntID );
    SetGVarFloat( "h_IntX", 0.00, HouseIntID );
    SetGVarFloat( "h_IntY", 0.00, HouseIntID );
    SetGVarFloat( "h_IntZ", 0.00, HouseIntID );
SetGVarFloat( "h_X", X, HouseIntID );
SetGVarFloat( "h_Y", Y, HouseIntID );
SetGVarFloat( "h_Z", Z, HouseIntID );
SetGVarInt( "h_Rent", 1500, HouseIntID );
 
    SetGVarInt( "HousePickup", CreateDynamicPickup( 1273, 23, GetGVarFloat( "h_X", HouseIntID ), GetGVarFloat( "h_Y", HouseIntID ), GetGVarFloat( "h_Z", HouseIntID ) ), HouseIntID );
SetGVarInt( "House3DText", _:CreateDynamic3DTextLabel( "{FF0000}Nobody", ~1, GetGVarFloat( "h_X", HouseIntID ), GetGVarFloat( "h_Y", HouseIntID ), GetGVarFloat( "h_Z", HouseIntID ), 30.0 ), HouseIntID );
 
SetPlayerPos( playerid, X - 5, Y, Z );
 
gsString[ 0 ] = EOS;
strcat( gsString, "Madd Doggs Mansion (5)n
  The Johnsons House (3)n
                       Verdant Bluffs Safehouse (8)n
                       Hashbury House (10)n
                       Golden Bed Motel Room (9)n" );
    strcat( gsString, "Big Smoke's Crack Palace (2)n
        House 1 (3)n
                       House 2 (2)n
                       House 3 (1)n
                       House 4 (7)n" );
    strcat( gsString, "House 5 (15)n
                       House 6 (15)n
                       House 7 (15)n
  Ryder's House (2)n
  Sweets House (1)n
  Jefferson Motel (15)" );
    ShowPlayerDialog( playerid, DIALOG_HOUSE_INTERIOR, DIALOG_STYLE_LIST, ""W"House Interior", gsString, "(Select)", "(Cancel)" );
    SendSuccess( playerid, "You created the house on this position!" );
return true;
}

server.php

Link to comment
Share on other sites

  • 0
  • 0
Link to comment
Share on other sites

  • 0

Lasa-l te rog pe asta

 

Trebuia doar sa ma intrebi ce versiune de mysql folosesc, da folosesc R39-2, pentru ca e cel mai bun , in momentul de fata.

Maybe momentary ^^

Edited by (SE)KnowN

242086.png

Link to comment
Share on other sites

  • 0
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.