Jump to content
MakeWebGames

Recommended Posts

Posted

This will aloow users To Lose There jobs i thought i would post but please no moaning about saying i aint wriitin it its a free mod i took it off my old game files and wrote everything on there

Ok Insert into your sql

ALTER TABLE users ADD strikes INT(11) NOT NULL DEFAULT '0';

Then in authenticate.php

find

header("Location: loggedin.php");

add above

$db->query("UPDATE users SET strikes=0 WHERE userid={$mem['userid']}");

Add This To Your Cron Day

if($ir['strikes'] == 3)

{

$db->query("UPDATE users SET jobs=0, jobrank=0");

}

Add This Also To Your cRon Day

$db->query("UPDATE users SET strikes=strikes+1 WHERE strikes < 3");

in job.php Find

 

if($ir['strength'] >= $r['jrSTRN'] && $ir['labour'] >= $r['jrLABOURN'] && $ir['IQ'] >= $r['jrIQN'])

{

$db->query("UPDATE users SET job={$_GET['interview']},jobrank={$r['jrID']} WHERE userid=$userid;");

print "{$r['jOWNER']}: Okay {$ir['username']}, we're good to go, see you tomorrow.

{$ir['username']}: Thanks!

[/url]";

}

else

{

print "{$r['jOWNER']}: Sorry {$ir['username']}, you're not far enough in the game to work in this job. You'll need:";

if($ir['strength'] < $r['jrSTRN'])

{

$s=$r['jrSTRN']-$ir['strength'];

print " $s more strength, ";

}

if($ir['labour'] < $r['jrLABOURN'])

{

$s=$r['jrLABOURN']-$ir['labour'];

print " $s more labour, ";

}

if($ir['IQ'] < $r['jrIQN'])

{

$s=$r['jrIQN']-$ir['IQ'];

print " $s more IQ, ";

}

print "before you'll be able to work here!

";

}

}

}

 

replace with

 

$code=rand(0,20);

if($ir['strikes'] >=3 && $code==10)

{

if($ir['strength'] >= $r['jrSTRN'] && $ir['labour'] >= $r['jrLABOURN'] && $ir['IQ'] >= $r['jrIQN'])

{

$db->query("UPDATE users SET job={$_GET['interview']},jobrank={$r['jrID']} WHERE userid=$userid;");

print "{$r['jOWNER']}: Okay {$ir['username']}, we're good to go, see you tomorrow.

 

{$ir['username']}: Thanks!

 

";

}

else

{

print "{$r['jOWNER']}: Sorry {$ir['username']}, You can not get a job today try again tomorrow.";

$h->endpage();

exit;

  }

}

else if($ir['strikes'] <=2 && $code !=10)

{

if($ir['strength'] >= $r['jrSTRN'] && $ir['labour'] >= $r['jrLABOURN'] && $ir['IQ'] >= $r['jrIQN'])

{

$db->query("UPDATE users SET job={$_GET['interview']},jobrank={$r['jrID']} WHERE userid=$userid;");

print "{$r['jOWNER']}: Okay {$ir['username']}, we're good to go, see you tomorrow.

 

{$ir['username']}: Thanks!

 

";

}

else

{

print "{$r['jOWNER']}: Sorry {$ir['username']}, you're not far enough in the game to work in this job. You'll need:";

if($ir['strength'] < $r['jrSTRN'])

{

$s=$r['jrSTRN']-$ir['strength'];

print " $s more strength, ";

}

if($ir['labour'] < $r['jrLABOURN'])

{

$s=$r['jrLABOURN']-$ir['labour'];

print " $s more labour, ";

}

if($ir['IQ'] < $r['jrIQN'])

{

$s=$r['jrIQN']-$ir['IQ'];

print " $s more IQ, ";

}

print "before you'll be able to work here!

";

}

}

}

}

 

Still In Job.php Find

 

function job_index()

{

global $db, $ir,$c,$userid,$h;

print "<h3>Your Job</h3>

You currently work in the {$ir['jNAME']}! You receive \${$ir['jrPAY']} each day at 5pm!

 

You also receive {$ir['jrIQG']} IQ, {$ir['jrSTRG']} strength, and {$ir['jrLABOURG']} labour!

 

<table width=50% cellspacing=1 class='table'><tr><td>Strength: {$ir['strength']}</td><td>IQ: {$ir['IQ']}</td></tr><tr><td>Labour: {$ir['labour']}</td><td>Job Rank: {$ir['jrNAME']}</td></tr></table>

Job Ranks

 

<table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Title</th><th>Pay</th><th>Strength Reqd</th><th>IQ Reqd</th><th>Labour Reqd</th><th>Labour Reqd</th></tr>";

$q=$db->query("SELECT * FROM jobranks WHERE jrJOB={$ir['job']} ORDER BY jrPAY ASC;");

while($r=$db->fetch_row($q))

{

print "<tr><td>{$r['jrNAME']}</td><td>\${$r['jrPAY']}</td><td>{$r['jrSTRN']}</td><td>{$r['jrIQN']}</td><td>{$r['jrLABOURN']}</td></tr>";

}

print "</table>

 

> Try To Get Promoted

 

> Quit";

}

 

replace with

 

function job_index()

{

global $db, $ir,$c,$userid,$h;

print "<h3>Your Job</h3>

You currently work in the {$ir['jNAME']}! You receive \${$ir['jrPAY']} each day at 5pm!

 

You also receive {$ir['jrIQG']} IQ, {$ir['jrSTRG']} strength, and {$ir['jrLABOURG']} labour!

 

<table width=50% cellspacing=1 class='table'><tr><td>Strength: {$ir['strength']}</td><td>IQ: {$ir['IQ']}</td></tr><tr><td>Labour: {$ir['labour']}</td><td>Job Rank: {$ir['jrNAME']}</td></tr></table>

Job Ranks

 

<table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Title</th><th>Pay</th><th>Strength Reqd</th><th>IQ Reqd</th><th>Labour Reqd</th><th>Total Strikes</th></tr>";

$q=$db->query("SELECT * FROM jobranks WHERE jrJOB={$ir['job']} ORDER BY jrPAY ASC;");

while($r=$db->fetch_row($q))

{

print "<tr><td>{$r['jrNAME']}</td><td>\${$r['jrPAY']}</td><td>{$r['jrSTRN']}</td><td>{$r['jrIQN']}</td><td>{$r['jrLABOURN']}</td><td>{$ir['strikes']}</td></tr>";

}

print "</table>

 

> Try To Get Promoted

 

> Quit";

}

 

Any Errors Please Post

Posted

Re: Lose Your Job

 

This will aloow users To Lose There jobs i thought i would post but please no moaning about saying i aint wriitin it its a free mod i took it off my old game files and wrote everything on there

*sigh* Can we at least try to limit the bad spelling to one word per sentence? Periods would be nice too.

Posted

Re: Lose Your Job

 

Add This To Your Cron Day

if($ir['strikes'] == 3)

{

$db->query("UPDATE users SET jobs=0, jobrank=0");

}

you sure thats gonna work..

Posted

Re: Lose Your Job

Well cron day does not use $ir... so it wouldnt have worked anyway. So according to his cron additions, the strikes just added up and no one ever lost their job.

Posted

Re: Lose Your Job

 

$db->query("UPDATE users SET strikes=strikes+1 WHERE strikes < 3");

 

Will that work then

Work for? That adds a strike to people with less than 3 strikes. SO if that was what you are trying to do, then congrats, yes that part works. But the part we were talking about does not work.

Posted

Re: Lose Your Job

This Working for me in cron_day

find

$ids[]=$r['fed_userid'];

}

add below

if($ir['strikes'] == 3)

{

$db->query("UPDATE users SET jobs=0, jobrank=0");

}

works well on my game post if any errors

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...