Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Slark__ on Sep 19, 2016, 06:16 PM

Title: Need spawnprop cmd
Post by: Slark__ on Sep 19, 2016, 06:16 PM
hello im making my own property system.. i need spawnprop cmd help .. if anyone idea or have help me :)
Title: Re: Need spawnprop cmd
Post by: aXXo on Sep 19, 2016, 06:38 PM
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi0.kym-cdn.com%2Fphotos%2Fimages%2Fnewsfeed%2F000%2F126%2F314%2F3cd8a33a.png%3F1306264975&hash=a81fe9cee29ecff77bd245425619359d5a7d7ae2)
Title: Re: Need spawnprop cmd
Post by: Murdock on Sep 20, 2016, 07:01 AM
Spawnprop? What?
Title: Re: Need spawnprop cmd
Post by: Slark__ on Sep 20, 2016, 07:38 AM
Quote from: Murdock on Sep 20, 2016, 07:01 AMSpawnprop? What?

lif i setspawn pos to my property .. when ever i join server. i will spawn at my property.

Title: Re: Need spawnprop cmd
Post by: MacTavish on Sep 20, 2016, 07:44 AM
it is simple just check how many props you own select a random prop coods and spawn yourself

e.g player.Pos = Vector(prop.Pos.x, prop.Pos,y,prop.Pos.z);
Title: Re: Need spawnprop cmd
Post by: Slark__ on Sep 20, 2016, 07:45 AM
Quote from: MacTavish on Sep 20, 2016, 07:44 AMit is simple just check how many props you own select a random prop coods and spawn yourself

e.g player.Pos = Vector(prop.Pos.x, prop.Pos,y,prop.Pos.z);

TY i will try.
Title: Re: Need spawnprop cmd
Post by: Slark__ on Sep 20, 2016, 04:38 PM
       local q = QuerySQL( db, "SELECT Name, rowid FROM Properties WHERE Owner LIKE '" + player.Name + "'" );
            if ( GetSQLColumnData(q,0) != null )
            {
       local splitPos = split( GetSQLColumnData( q, 5 ), " " );
       local x = splitPos[ 1 ], y = splitPos[ 2 ], z = splitPos[ 3 ];
       player.Pos = Vector(x.tofloat(), y.tofloat(), z.tofloat());
            MessagePlayer("[#F9FF2A]*Teleported* [#FFFFFF]Teleported To Your Property!", player );
       FreeSQLQuery(q);
       }

i tried .. i cant goto prop when i spawn.
Title: Re: Need spawnprop cmd
Post by: Xmair on Sep 20, 2016, 04:51 PM
You are selecting Name and rowid only from the query.
Title: Re: Need spawnprop cmd
Post by: Slark__ on Sep 20, 2016, 05:11 PM
Quote from: Xmair on Sep 20, 2016, 04:51 PMYou are selecting Name and rowid only from the query.

its wrong? any help pls?
Title: Re: Need spawnprop cmd
Post by: KAKAN on Sep 21, 2016, 08:44 AM
Quote from: Slark__ on Sep 20, 2016, 05:11 PM
Quote from: Xmair on Sep 20, 2016, 04:51 PMYou are selecting Name and rowid only from the query.

its wrong? any help pls?

Use SELECT *Because that's what I see in most shitty scripts :p
Title: Re: Need spawnprop cmd
Post by: Slark__ on Sep 21, 2016, 10:17 AM
Quote from: KAKAN on Sep 21, 2016, 08:44 AM
Quote from: Slark__ on Sep 20, 2016, 05:11 PM
Quote from: Xmair on Sep 20, 2016, 04:51 PMYou are selecting Name and rowid only from the query.

its wrong? any help pls?

Use SELECT *Because that's what I see in most shitty scripts :p

Yup but i fixed :D