Jump to content
MakeWebGames

shrek1609

Members
  • Posts

    310
  • Joined

  • Last visited

    Never

Everything posted by shrek1609

  1. Re: V2 crimes formular need tutorial Will repost the smiley code messed it up :-(   This is the formula. ((WILL*0.8)/2.5)+(LEVEL/4) ---------------------------- ((WILL*0.8)/2.5) This formula decides how the user's will affects their crimes success rate. Lets show a few examples. Example 1a. ((WILL*0.7)/17) User's will: 100 You start by running the functions in the parentheses. So it would end up being: ((70)/17) After that you just run the formula 70/17 Which Equals: 4.1176470588235294117647058823529 So using that formula on a user with 100 will would give them a 4.1176470588235294117647058823529% chance of the user succeeding. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Example 2a. ((WILL*0.4)/39) User's will: 531 You start by running the functions in the parentheses. So it would end up being: ((212.4)/39) After that you just run the formula 212.4/39 Which Equals: 5.4461538461538461538461538461538 So using that formula on a user with 531 will would give them a 5.4461538461538461538461538461538% chance of the user succeeding. ----------------------------- (LEVEL/4) This pretty much explains itself. This formula decides how the user's level affects a user's chance of succeeding a crime. Lets show a few more examples. Example 1b. (LEVEL/21) User's level: 51 Basically all you would be doing is: 51/21 So just run the formula which equals: 2.4285714285714285714285714285714 So if this was the only formula the user would have a 2.4285714285714285714285714285714% chance of succeeding. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Example 2b. (LEVEL/54) User's level: 98 As the other formula goes: 98/54 So that would equal: 1.8148148148148148148148148148148 If that was the only formula the user would have a 1.8148148148148148148148148148148% chance of succeeding. ----------------------------- Now we combine the formulas... ----------------------------- Formula 1 Example 1a+example 1b 4.1176470588235294117647058823529+2.4285714285714285714285714285714=6.546218487394957983193277310923 So by combining the 2 formulas with each-other the chance of succeeding the crime is 6.546218487394957983193277310923%. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formula 2 Example 2a+example 2b 4.1176470588235294117647058823529+1.8148148148148148148148148148148=5.932461873638344226579520697166 So by combining the 2 formulas with each-other the chance of succeeding the crime is 5.932461873638344226579520697166%.
  2. Re: V2 crimes formular need tutorial Not sure if this will help you out or not just don't read it after you've had a drink :-D   This is the formula. ((WILL*0.8)/2.5)+(LEVEL/4) ---------------------------- ((WILL*0.8)/2.5) This formula decides how the user's will affects their crimes success rate. Lets show a few examples. Example 1a. ((WILL*0.7)/17) User's will: 100 You start by running the functions in the parentheses. So it would end up being: ((70)/17) After that you just run the formula 70/17 Which Equals: 4.1176470588235294117647058823529 So using that formula on a user with 100 will would give them a 4.1176470588235294117647058823529% chance of the user succeeding. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Example 2a. ((WILL*0.4)/39) User's will: 531 You start by running the functions in the parentheses. So it would end up being: ((212.4)/39) After that you just run the formula 212.4/39 Which Equals: 5.4461538461538461538461538461538 So using that formula on a user with 531 will would give them a 5.4461538461538461538461538461538% chance of the user succeeding. ----------------------------- (LEVEL/4) This pretty much explains itself. This formula decides how the user's level affects a user's chance of succeeding a crime. Lets show a few more examples. Example 1b. (LEVEL/21) User's level: 51 Basically all you would be doing is: 51/21 So just run the formula which equals: 2.4285714285714285714285714285714 So if this was the only formula the user would have a 2.4285714285714285714285714285714% chance of succeeding. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Example 2b. (LEVEL/54) User's level: 98 As the other formula goes: 98/54 So that would equal: 1.8148148148148148148148148148148 If that was the only formula the user would have a 1.8148148148148148148148148148148% chance of succeeding. ----------------------------- Now we combine the formulas... ----------------------------- Formula 1 Example 1a+example 1b 4.1176470588235294117647058823529+2.4285714285714285714285714285714=6.546218487394957983193277310923 So by combining the 2 formulas with each-other the chance of succeeding the crime is 6.546218487394957983193277310923%. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formula 2 Example 2a+example 2b 4.1176470588235294117647058823529+1.8148148148148148148148148148148=5.932461873638344226579520697166 So by combining the 2 formulas with each-other the chance of succeeding the crime is 5.932461873638344226579520697166%.
  3. Re: [MC Codes]{V1}{V2} Dice game:) messaged you but will ask questions in here in case anyone else has same questions... Do the die images come with the mod... and it seems if you bet on odds or evens you only win the same amount back as you betted... hence winning nothing...
  4. Re: [Free] [v1] Profile Image Uploader Bit of help please... i've used this code and can upload only .gif files all the rest say This file type .jpg is not allowed. Back same for .png .bmp .jpeg .bmp any ideas please :)   <?php /*----------------------------------------------------- -- Isomerizer -- Copyright held 2007-2008 © Isomerizer.com -- uploadpic.php -----------------------------------------------------*/ include "globals.php"; if(empty($_FILES['imagefile'])) { echo ' Upload an Profile Image: <form name="imageuploader" method="post" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data"> [i]Path of Image:[/i] <input type="file" name="imagefile"> <input type="submit" name="Submit" value="Upload Image"> </form> (Max 10000 file bytes , Must be file extention gif, jpg, jpeg, png, bmp....) (Images are resized to 150 x 150) '; } else { //Edit below for max fb size of the pic $maxsize=1000000; /*Basic security procedures*/ if(!$_SERVER['REQUEST_METHOD'] == "POST" || !isset($_SERVER['HTTP_USER_AGENT'])){ echo 'Hack Attempt!'; $h->endpage(); exit; } $headerinject = array("Content-Type:", "MIME-Version:", "Content-Transfer-Encoding:", "bcc:", "cc:"); foreach($_POST as $k => $v){ foreach($headerinject as $v2){ if(strpos($v, $v2) !== false){ logBadRequest(); header("HTTP/1.0 403 Forbidden"); exit; } } } /*What extensions can be used?*/ $valid = array( 'image/gif', 'image/png', 'image/jpeg', 'image/jpg', 'image/bmp' ); /*If the extension isnt allowed...*/ if(!in_array($_FILES['imagefile']['type'], $valid)) { $type = strrchr($_FILES['imagefile']['name'], '.'); echo 'This file type '.$type.' is not allowed. [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Check image size*/ if ($_FILES['imagefile']['size'] > $maxsize) { echo 'Image to large [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } $check = ''.$_FILES['imagefile']['tmp_name'].''; /*Check for .exe files*/ if (is_executable($check) || !is_file($check)) { echo 'The file '.$_FILES['imagefile']['name'].' seems to be harmful to the server [url="u'.$_SERVER['PHP_SELF'].'"]Back[/url]'; @unlink($check); $h->endpage(); exit; } /*Now to create the correct image using php*/ if ($_FILES['imagefile']['type']=="image/jpeg") { $create = @ImageCreateFromJPEG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpeg($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/png") { $create = @ImageCreateFromPNG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagepng($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/jpg") { $create = @ImageCreateFromJPG(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagejpg($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/gif") { $create = @ImageCreateFromGIF(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagegif($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } if ($_FILES['imagefile']['type']=="image/bmp") { $create = @ImageCreateFromBMP(''.$_FILES['imagefile']['tmp_name'].''); $image = @Imagebmp($create, 'profilepics/'.$_FILES['imagefile']['name'].''); } /*Destroy the php image*/ @unlink(''.$_FILES['imagefile']['tmp_name'].''); @ImageDestroy($create); /*If php could not create the image*/ if (empty($image) || empty($create) || !$create || !$image) { echo 'The image you are trying to upload seems to be corrupt please try again! [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } $path='profilepics/'; $pic=mysql_real_escape_string($_FILES['imagefile']['name']); $picture=$path.$pic; $oldpic=$ir['display_pic']; /*Check to see if its already uploaded*/ if ($picture==$oldpic) { echo ' Image already uploaded![url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Delete previous image to save space*/ $delete=@unlink($oldpic); if ($delete) { echo 'Previous image deleted from system... '; } if (!$delete) { echo 'No Previous image to be deleted... '; } $dataa=$_FILES['imagefile']['size']; $datab=$_FILES['imagefile']['type']; $datad=$_FILES['imagefile']['name']; /*Information for user*/ echo 'Old Image Location: '.$oldpic.' New Image Location: '.$picture.' Image Uploaded <u>Info:</u> Image Name: '.$datad.' Image Size: '.$dataa.' bytes Type: '.$datab.' [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; /*Check DB*/ $check=mysql_query("SELECT COUNT(*) as cnt FROM users WHERE display_pic='$picture'", $c); $checks=mysql_fetch_array($check); if ($checks['cnt']>0) { echo 'Please use another image name [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } /*Update DB*/ $db->query("UPDATE users SET display_pic='$picture' WHERE userid=$userid",$c); } $h->endpage(); exit; ?>
  5. As anyone got the sql file for this mod please :) thanks
  6. Re: [Mccode][Free] House Pictures I think i've fixed the problem :) in staff_houses.php i've changed $db->query("INSERT INTO houses VALUES(NULL, '$name', '$price', '$will' )"); to $db->query("INSERT INTO houses VALUES(NULL, '$name', '$price', '$will', 'change')"); and seems to work fine now...
  7. Re: [Mccode][Free] House Pictures I've added this and got the images working just fine :-D But got a bit of a problem now trying to add new houses... I get this mysql error... QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO houses VALUES(NULL, 'tent', '50000', '200') any help would be appreciated :)
×
×
  • Create New...