Basic Property System (with pickup model changing)

Started by Sebastian, Apr 12, 2017, 10:03 PM

Previous topic - Next topic

EK.IceFlake

Quote from: Cool on Apr 13, 2017, 08:05 AMWhy all people Releasing things in sqlite You guys should post in both
That's why you use a library.

Sebastian

But do we really need to use MySQL for such a System?
I see it benefic for account System, because online  stats.. But for property?  Players would better check them ingame :)

vito

why this topic started to be holywar about databases :<

Yankee

Help me it gives error on cmd : AN ERROR HAS OCCURED [the index 'command' does not exist

CALLSTACK
FUNCTION [onPlayerCommand<> [the indenx 'command' does not exist ]

Sebastian

Quote from: Yankee on May 27, 2017, 08:29 AMHelp me it gives error on cmd : AN ERROR HAS OCCURED [the index 'command' does not exist

Use this format for your function:
onPlayerCommand( player, command, text )
Then (by the instalation guide of this system) you will have this as a top line in the function:
local cmd = command.tolower();

Yankee

Quote from: sseebbyy on May 27, 2017, 09:26 AM
Quote from: Yankee on May 27, 2017, 08:29 AMHelp me it gives error on cmd : AN ERROR HAS OCCURED [the index 'command' does not exist

Use this format for your function:
onPlayerCommand( player, command, text )
Then (by the instalation guide of this system) you will have this as a top line in the function:
local cmd = command.tolower();

Thanks mate like +1

Derwaish.

Problem Solved............ :D

Razor.

When I hit the pickup, nothing happens ...
Only appeared once.

Derwaish.

Quote from: [UK]Razor5K. on Jun 08, 2017, 02:09 PMWhen I hit the pickup, nothing happens ...
Only appeared once.
Give error screenshot. you did not copy paste properly.

Razor.



function onPickupPickedUp( player, pickup )
{
if ( pickup.Model == 407 )
{
if( prop[ pickup.ID ] != null )
{
local   id = pickup.ID,
propid = prop[ id ].ID,
name = prop[ id ].Name,
price = prop[ id ].Price,
owner = prop[ id ].Owner,
sharing = prop[ id ].Sharing,
description = prop[ id ].Description;
 
C_MSG2( "ID:[#FFFFFF] " + propid + " [#FFFF00]Nome:[#FFFFFF] " + name + " [#FFFF00]Preco:[#FFFFFF] " + price + "[#FFFF00].", player );
}
}
if ( pickup.Model == 406 )
{
if( prop[ pickup.ID ] != null )
{
local   id = pickup.ID,
propid = prop[ id ].ID,
name = prop[ id ].Name,
price = prop[ id ].Price,
owner = prop[ id ].Owner,
sharing = prop[ id ].Sharing,
description = prop[ id ].Description;
                     
C_MSG( "[#CAE1FF]ID:[#FFFFFF] " + propid + " [#CAE1FF]Nome:[#FFFFFF] " + name + " [#CAE1FF]Dono:[#FFFFFF] " + owner + " [#CAE1FF]Compartilhada com:[#FFFFFF] " + sharing + "[#CAE1FF].", player );
}
}
}

Sebastian

Try implementing my script in a blank server. If it works, then it's good.
This will mean you have implemented it wrongly in your screenshoted server.

Razor.

Quote from: sseebbyy on Jun 08, 2017, 03:39 PMTry implementing my script in a blank server. If it works, then it's good.
This will mean you have implemented it wrongly in your screenshoted server.
When I create a property it works correctly, but when I reboot the server from this error.

Sebastian

Quote from: Razor5K. on Jun 08, 2017, 03:51 PMWhen I create a property it works correctly, but when I reboot the server from this error.

Be sure you did take care of this:

Quote from: first postPS2: You must place CreateProperties before any other CreatePickup() !

Cool

Just added in my server now and watched the whole code Very nice work how you done it just few queries + clean code no spam :D
Just awesome work nothing else

Sebastian

Quote from: Cool on Jul 26, 2017, 09:53 AMJust added in my server now and watched the whole code Very nice work how you done it just few queries + clean code no spam :D
Just awesome work nothing else

Thanks! I'm still pretty sure it could be done a lot better than this, haha.
@. what do you say ?