SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Gamemode Scripts

Reply
 
Thread Tools Display Modes
Old 29/03/2020, 11:14 AM   #1
SiM2hmoud
Little Clucker
 
Join Date: Mar 2020
Location: Tunisia
Posts: 19
Reputation: 12
Flowers Si Freeroam 2.0 (Full Version)

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://forum.sa-mp.com/showthread.php?t=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
SiM2hmoud is offline   Reply With Quote
Old 29/03/2020, 11:27 AM   #2
Fairuz
Huge Clucker
 
Fairuz's Avatar
 
Join Date: Sep 2015
Location: Indonesia
Posts: 455
Reputation: 78
Default Re: Si Freeroam 2.0 (Full Version)

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
Fairuz is offline   Reply With Quote
Old 29/03/2020, 11:29 AM   #3
SiaReyes
Gangsta
 
Join Date: Mar 2019
Location: Coordinates X,Y,Z
Posts: 618
Reputation: 57
Default Re: Si Freeroam 2.0 (Full Version)

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.
SiaReyes is offline   Reply With Quote
Old 29/03/2020, 12:10 PM   #4
SiM2hmoud
Little Clucker
 
Join Date: Mar 2020
Location: Tunisia
Posts: 19
Reputation: 12
Flowers Re: Si Freeroam 2.0 (Full Version)

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.
SiM2hmoud is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Teleport Script [Full Version] Vikshay Filterscripts 2 24/07/2014 04:23 AM
[FilterScript] Fullveh Full System of Vehicles v1.1 (new Version) Schocc Lanšamentos/Releases 46 17/03/2014 02:39 PM
[GameMode] Xtreme Kakashi V2 [FULL VERSION] (Still in Development) lyrics Gamemode Scripts 12 25/06/2013 04:21 PM
[GameMode] Xtreme Kakashi V2 [FULL VERSION] [NEWS!] lyrics Gamemode Scripts 9 13/08/2011 01:56 PM


All times are GMT. The time now is 08:45 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.