Jump to content
MakeWebGames

City Tax (Gang Addon)


Recommended Posts

I have decided to release this module for free can leaders can purchase a city and set a tax value 0-15% of there crime earnings

Gang leader will see who is owe them money from a log in the gang options and be able to claim it aswell once that's done it adds it to the gangs vault

SQL

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Open explore.php and find

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

below this line add

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

open up yourgang.php and find

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

in the switch statements add 2 new cases

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

now find function gang_staff_idx() and replace it with this function or edit in if you need to

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

below that function add these two functions

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Replace docrime.php with this if its not been edited

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Edited by NonStopCoding
Link to comment
Share on other sites

  • 1 year later...

wrong fields?

A critical error has occurred, and page execution has stopped. Below are the details:

1054: Unknown column 'cityid' in 'where clause'

Action taken: Attempted to execute query: UPDATE `citypayments` SET `earnings` = `earnings` + 0.75 WHERE `userid` = 1

AND `cityid` = 1 AND `cowner` = 1

Link to comment
Share on other sites

wrong fields?

A critical error has occurred, and page execution has stopped. Below are the details:

1054: Unknown column 'cityid' in 'where clause'

Action taken: Attempted to execute query: UPDATE `citypayments` SET `earnings` = `earnings` + 0.75 WHERE `userid` = 1

AND `cityid` = 1 AND `cowner` = 1

 

what page is showing these errors could help me faster but updated the location to cityid so fixes that

I have fully updated the table above give it a try ?

Edited by NonStopCoding
Link to comment
Share on other sites

 

what page is showing these errors could help me faster but updated the location to cityid so fixes that

I have fully updated the table above give it a try ?

 

try this

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

use this docrime.php

http://pastie.org/10875551

Edited by NonStopCoding
Link to comment
Share on other sites

  • 3 years later...

I have an issue with not deleting row from database after collection payment.

the query is $db->query("DELETE FROM `citypayments` WHERE `cowner` = {$gangdata['gangPRESIDENT']}");

help will be appreciated.

Link to comment
Share on other sites

43 minutes ago, Magictallguy said:

From reading the code originally posted in 2015 and if I understand correctly, alter that query to
 

$db->query('DELETE FROM citypayments WHERE cowner = '.$gangdata['gangID']);

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

I did try this earlier aswell but it deletes every row where the 'cowner' is gang ID but only collects selected row on gang function.

Link to comment
Share on other sites

19 minutes ago, Magictallguy said:

Query updated

Dont think that will work either.. it will just delete every tax owed in the location and only claim the selected row.. it needs to select userid from citypayments and delete that row 🤔

Link to comment
Share on other sites

30 minutes ago, Magictallguy said:

Query updated

Always miss the basics haha 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

this should work!

There is now an issue with the docrime.php file where if the city is not owned It only displays the 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

otherwise if the city is owned the page is displayed correctly with the queries submitting. 

This mod will be something if it can be completed.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...