[GameMode] Si Freeroam 2.0 (Full Version)
#1

Si Freeroam 2.0 (Full Version):


It's time to release Si Freeroam 2.0 with a lot of updates, i've added a lot of things, you can check them below.


Code:
// -------------------- { Changelog: } --------------------------- //
// ------------------- { Added or Removed: } --------------------- //
// - Added credits to includes.
// - Added more Random messages.
// - Removed Driving & Pilot licenses.
// - Added a simple anti-ban evade.
// - Improved Drug system.
// - Removed "/useweed, /usecocaine, /usemeth, /mydrugs, /myfood, /usetaco, /usesoda, /usepizza".
// - Added " /usedrug <weed, meth or cocaine ".
// - Added " /inventory ".
// - Added Drug effects.
// - Added Animation when using drugs.
// - Added " /usefood <pizza, soda or taco".
// - Added Animations when using food.
// - Removed " /bweed, /bcocaine, /bmeth, /btaco, /bsoda, /bpizza ".
// - Added V.I.P shop (/vipshop).
// - Removed " /buyskin ".
// - Added " /gethealth, /getarmour, /aslap, /disarm, /banip " to Admins.
// - Added " /giveitem ", it can be used to sell items as well. 
// - Added Materials, that can be used to craft weapons using /craftweapon.
// - Players can use /tag to put tags above their names.
// - Added simple GPS system, " /gps ".
// - Added Anti C-bugging.
// - Added simple Anti-Cheat {Airbreak, Anti-Vehicle Speed Hack, Health Hack, Armour Hack, Jetpack Hack}.
// - Added Headshot system.
// - Removed the mapped objects & added more vehicles.
// ---------------------- { Optimazed: } ------------------------- //
// - Optimazed OnPlayerDeath.
// - Optimazed Drug system & Food system.
// - Optimazed V.I.P system.
// - Optimazed Admin system.
// ---------------------- { Bug fixes: } ------------------------- //
// - Fixed a bug where the " kill " added to the victim not the killer.
// - Fixed a bug where the V.I.P level is not saving.
// - Fixed a bug when you can buy weed, cocaine and meth without paying (V.I.P).
// - Fixed bug when you use ' /help or /rules ', the login & register dialogs appear.
// ---------------------------------------------------------------- //
This gamemode was just something like a warm up for me, so i'm not going to keep updating it. If you find any bugs you can send me a message i will try to fix them.

Screenshots can be found in the first post.

Si Freeroam Alpha Version (1.0): https://sampforum.blast.hk/showthread.php?tid=673329

Installtion:
- Download the whole folder from Github.
- Put the gamemode inside Gamemodes.
- Replace scriptfiles with the folder found inside the Github folder.
- Make sure you have all includes & plugins.
- Launch your server!


You have any questions ask me!

NOTE: This gamemode is a bit messy, so if you want to update it, go on. Make sure to add good things!

- SiM2hmoud.
DOWNLOAD: https://github.com/SiM2hmoud/Si-Freeroam
Reply
#2

No need to create a new thread. Just edit or make a new post in your old topic.
MySQL or SQLite version would be better instead
Reply
#3

Quote:

// - Optimazed OnPlayerDeath.

Code:
public OnPlayerDeath(playerid, killerid, reason)
{
    PlayerInfo[playerid][pDeaths]++;

    if(GetPlayerMoney(playerid) < 500)
    {
      SendClientMessage(playerid, CRED, "[SERVER]: You didn't have $500 to fix your wounds, the server paid in your place!");
    }
    else if(GetPlayerMoney(playerid) > 500)
    {
      SendClientMessage(playerid, CRED, "[SERVER]: You got killed/self-death and paid $500 to fix your wounds.");
      GivePlayerMoney(playerid, -500);
      PlayerInfo[playerid][pCash] -= 500;
    }

    if(killerid != INVALID_PLAYER_ID)
    {
        PlayerInfo[killerid][pKills]++;
        new pname[MAX_PLAYER_NAME], ename[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, pname, sizeof(pname));
        GetPlayerName(killerid, ename, sizeof(ename));
        format(string, sizeof(string), "[SERVER]: You killed %s and looted $1,000 from him (+ 1 Score).", pname);
        SendClientMessage(killerid, CLIME, string);
        format(string, sizeof(string), "[SERVER]: You have been killed by %s!", ename);
        SendClientMessage(playerid, CRED, string);
        GivePlayerMoney(killerid, 1000);
        PlayerInfo[killerid][pCash] += 1000;
        SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
    }

    SendDeathMessage(killerid, playerid, reason);

    return 1;
}
I think, it should be like, you didn't check if killerid is a valid player, it will throw runtime error.
You have declared pCash but didn't use it and also mySQL or SQLite Version will be good for a freeroam gamemode.
Reply
#4

Quote:
Originally Posted by Dice_
View Post
No need to create a new thread. Just edit or make a new post in your old topic.
MySQL or SQLite version would be better instead
I'm not good with MySQL or SQLite. I don't want to ruin the script. If you have any knowledge about MySQL or SQLite you can do it yourself & re-publish it under your name.


Quote:
Originally Posted by SiaReyes
View Post
Code:
public OnPlayerDeath(playerid, killerid, reason)
{
    PlayerInfo[playerid][pDeaths]++;

    if(GetPlayerMoney(playerid) < 500)
    {
      SendClientMessage(playerid, CRED, "[SERVER]: You didn't have $500 to fix your wounds, the server paid in your place!");
    }
    else if(GetPlayerMoney(playerid) > 500)
    {
      SendClientMessage(playerid, CRED, "[SERVER]: You got killed/self-death and paid $500 to fix your wounds.");
      GivePlayerMoney(playerid, -500);
      PlayerInfo[playerid][pCash] -= 500;
    }

    if(killerid != INVALID_PLAYER_ID)
    {
        PlayerInfo[killerid][pKills]++;
        new pname[MAX_PLAYER_NAME], ename[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, pname, sizeof(pname));
        GetPlayerName(killerid, ename, sizeof(ename));
        format(string, sizeof(string), "[SERVER]: You killed %s and looted $1,000 from him (+ 1 Score).", pname);
        SendClientMessage(killerid, CLIME, string);
        format(string, sizeof(string), "[SERVER]: You have been killed by %s!", ename);
        SendClientMessage(playerid, CRED, string);
        GivePlayerMoney(killerid, 1000);
        PlayerInfo[killerid][pCash] += 1000;
        SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
    }

    SendDeathMessage(killerid, playerid, reason);

    return 1;
}
I think, it should be like, you didn't check if killerid is a valid player, it will throw runtime error.
You have declared pCash but didn't use it and also mySQL or SQLite Version will be good for a freeroam gamemode.
Thanks for your feedback. I've added the script you gave me (OnPlayerDeath) and about MySQL & SQLite i'm not good at using theml.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)