SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 16/03/2017, 11:53 PM   #1
TonyVk
Big Clucker
 
TonyVk's Avatar
 
Join Date: Aug 2014
Location: Croatia
Posts: 75
Reputation: 21
Default Turf Wars v1.0 (GTA Online)

Turf Wars (GTA Online)
About:
This is game that is similar to Turf Wars in GTA Online. So the goal of this game is that the teams will compete who will gather more squares and win.
Exists 4 teams: orange, red, green and blue.
In 1 team can be players how many admin call in game.
When player from some team step on square that square change color in color of his team.
Map is dynamic and can be modified in game.
Spawn positions for teams are modified in game too.
When a player falls off the map he respawns automatically to a position where his team should spawn.
Vehicles can't be destroyed, they are fixed every 5 seconds.
Player from vehicle can't exit.
First 10 seconds every player is transparent because players from same team are spawned on same place.
Some updates are possible.
If you find some bug just say me in this thread or send me message.
In few days I will maybe record some video.
Install:
To use the script put .amx in Filterscripts and all from Scriptfiles put in Scriptfiles of your server.
After that open server.cfg and under Filterscripts add TurfWarsENG
Pictures:



http://i.imgur.com/xoI3vyH.png
http://i.imgur.com/QqFtYMr.png
http://i.imgur.com/tJ2dT8R.jpg
http://i.imgur.com/I7hIGpi.png
http://i.imgur.com/GeYxgaa.jpg
http://i.imgur.com/oWntqzY.jpg
http://i.imgur.com/qbqLYiw.png
Download:
https://www.mediafire.com/?o1zv98adz5ndzrj
http://pastebin.com/tQDqJ4KJ
TonyVk is offline   Reply With Quote
Old 17/03/2017, 02:28 AM   #2
Sebz
Big Clucker
 
Sebz's Avatar
 
Join Date: Dec 2012
Location: 127.0.0.1
Posts: 90
Reputation: 19
Default Re: Turf Wars v1.0 (GTA Online)

This actually looks really good. I've played a lot of that game mode on GTA Online and if it's anything like it, this could be a very nice addition to free roam servers.
Sebz is offline   Reply With Quote
Old 17/03/2017, 10:05 AM   #3
TonyVk
Big Clucker
 
TonyVk's Avatar
 
Join Date: Aug 2014
Location: Croatia
Posts: 75
Reputation: 21
Default Re: Turf Wars v1.0 (GTA Online)

Quote:
Originally Posted by Sebz View Post
This actually looks really good. I've played a lot of that game mode on GTA Online and if it's anything like it, this could be a very nice addition to free roam servers.
Only diffrence is that I didn't created rounds but maybe in some update I will. And in gta online that game has rockets to pick for car.
TonyVk is offline   Reply With Quote
Old 17/03/2017, 10:07 AM   #4
Bolex_
Huge Clucker
 
Bolex_'s Avatar
 
Join Date: Aug 2015
Location: Croatia
Posts: 499
Reputation: 77
Default Re: Turf Wars v1.0 (GTA Online)

TIP: Few improvements! Good Job anyway

:- Line 43 till 49

Code:
new TurfInfo[Turf];
new TurfStarted=0;
new turftimer;
new turfvehicles;
new Points[4];
new TurfVehicle[MAX_PLAYERS];
new Text:TurfRes[8];
- Also could be optimized as

Code:
new TurfInfo[Turf], TurfStarted = 0, turftimer, turfvehicles,  Points[4], Text:TurfRes[8],  TurfVehicle[MAX_PLAYERS];
- Line 38 till 41

Code:
Float:Pos1[4],
Float:Pos2[4],
Float:Pos3[4],
Float:Pos4[4]
Code:
Float:Pos1[4], Float:Pos2[4], Float:Pos3[4],  Float:Pos4[4]
- You should use "GetPlayerPoolSize" for looping, it get's the highest userid that's playing!



Code:
CMD:turfhelp(playerid,params[])
{
    new info[700];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""RED"ERROR | "GRAY"You need to be Rcon!");
    strcat(info, ""RED"Turf Help\n\n", sizeof(info));
    strcat(info, "Create/Edit objects\n", sizeof(info));
    strcat(info, ""GRAY"/createobject-Spawn object which can be edited\n", sizeof(info));
    strcat(info, " /removeobject-Remove object with that ID\n", sizeof(info));
    strcat(info, " /eobject-Edit position of object\n", sizeof(info));
    strcat(info, " /duplicateobject-Duplicate object with that ID\n", sizeof(info));
    strcat(info, " /turfspawn-Set spawn location for 4 teams\n", sizeof(info));
    strcat(info, " /portobject-Port to location of object\n", sizeof(info));
    strcat(info, ""RED"Start/Stop Turf Wars\n", sizeof(info));
    strcat(info, ""GRAY"/turfinvite-Invite players in 1 of 4 teams\n", sizeof(info));
    strcat(info, "/turfstart-Start Turf Wars\n", sizeof(info));
    strcat(info, "/turfstop-Stop Turf Wars\n", sizeof(info));
    ShowPlayerDialog(playerid, 31999, DIALOG_STYLE_MSGBOX, "Turf Wars Help", info, "Ok", "");
    return 1;
}
- Move to SQL/MYSQL & EasyDialog
__________________
Son of Roozevelt <3
Bolex_ is offline   Reply With Quote
Old 17/03/2017, 10:10 AM   #5
SyS
High-roller
 
SyS's Avatar
 
Join Date: Oct 2015
Posts: 1,966
Reputation: 412
Default Re: Turf Wars v1.0 (GTA Online)

Quote:
Originally Posted by Scripter18 View Post
TIP: Few improvements!

:- Line 43 till 49

Code:
new TurfInfo[Turf];
new TurfStarted=0;
new turftimer;
new turfvehicles;
new Points[4];
new TurfVehicle[MAX_PLAYERS];
new Text:TurfRes[8];
- Also could be optimized as

Code:
new TurfInfo[Turf], TurfStarted = 0,  turftimer, turfvehicles,  Points[4], Text:TurfRes[8],  TurfVehicle[MAX_PLAYERS];
- You should use "GetPlayerPoolSize" for looping, it get's the highest userid that's playing!



Code:
CMD:turfhelp(playerid,params[])
{
    new info[700];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""RED"ERROR | "GRAY"You need to be Rcon!");
    strcat(info, ""RED"Turf Help\n\n", sizeof(info));
    strcat(info, "Create/Edit objects\n", sizeof(info));
    strcat(info, ""GRAY"/createobject-Spawn object which can be edited\n", sizeof(info));
    strcat(info, " /removeobject-Remove object with that ID\n", sizeof(info));
    strcat(info, " /eobject-Edit position of object\n", sizeof(info));
    strcat(info, " /duplicateobject-Duplicate object with that ID\n", sizeof(info));
    strcat(info, " /turfspawn-Set spawn location for 4 teams\n", sizeof(info));
    strcat(info, " /portobject-Port to location of object\n", sizeof(info));
    strcat(info, ""RED"Start/Stop Turf Wars\n", sizeof(info));
    strcat(info, ""GRAY"/turfinvite-Invite players in 1 of 4 teams\n", sizeof(info));
    strcat(info, "/turfstart-Start Turf Wars\n", sizeof(info));
    strcat(info, "/turfstop-Stop Turf Wars\n", sizeof(info));
    ShowPlayerDialog(playerid, 31999, DIALOG_STYLE_MSGBOX, "Turf Wars Help", info, "Ok", "");
    return 1;
}
- Move to SQL/MYSQL & EasyDialog
how the hell is that optmised? reducing number of lines is not optmising.if you got some valid points regarding optimising tell it not such a bull shit.
__________________

SyS is offline   Reply With Quote
Old 17/03/2017, 10:13 AM   #6
Bolex_
Huge Clucker
 
Bolex_'s Avatar
 
Join Date: Aug 2015
Location: Croatia
Posts: 499
Reputation: 77
Default Re: Turf Wars v1.0 (GTA Online)

Quote:
Originally Posted by Sreyas View Post
how the hell is that optmised? reducing number of lines is not optmising.if you got some valid points regarding optimising tell it not such a bull shit.
I gave him only a couple of examples, because there are many more. This is another example of that
__________________
Son of Roozevelt <3
Bolex_ is offline   Reply With Quote
Old 17/03/2017, 10:15 AM   #7
SyS
High-roller
 
SyS's Avatar
 
Join Date: Oct 2015
Posts: 1,966
Reputation: 412
Default Re: Turf Wars v1.0 (GTA Online)

Quote:
Originally Posted by Scripter18 View Post
I gave him only a couple of examples, because there are many more. This is another example of that
and those examples wont make any sense.
__________________

SyS is offline   Reply With Quote
Old 17/03/2017, 11:07 AM   #8
TonyVk
Big Clucker
 
TonyVk's Avatar
 
Join Date: Aug 2014
Location: Croatia
Posts: 75
Reputation: 21
Default Re: Turf Wars v1.0 (GTA Online)

Quote:
Originally Posted by Scripter18 View Post
TIP: Few improvements! Good Job anyway

:- Line 43 till 49

Code:
new TurfInfo[Turf];
new TurfStarted=0;
new turftimer;
new turfvehicles;
new Points[4];
new TurfVehicle[MAX_PLAYERS];
new Text:TurfRes[8];
- Also could be optimized as

Code:
new TurfInfo[Turf], TurfStarted = 0, turftimer, turfvehicles,  Points[4], Text:TurfRes[8],  TurfVehicle[MAX_PLAYERS];
- Line 38 till 41

Code:
Float:Pos1[4],
Float:Pos2[4],
Float:Pos3[4],
Float:Pos4[4]
Code:
Float:Pos1[4], Float:Pos2[4], Float:Pos3[4],  Float:Pos4[4]
- You should use "GetPlayerPoolSize" for looping, it get's the highest userid that's playing!



Code:
CMD:turfhelp(playerid,params[])
{
    new info[700];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,""RED"ERROR | "GRAY"You need to be Rcon!");
    strcat(info, ""RED"Turf Help\n\n", sizeof(info));
    strcat(info, "Create/Edit objects\n", sizeof(info));
    strcat(info, ""GRAY"/createobject-Spawn object which can be edited\n", sizeof(info));
    strcat(info, " /removeobject-Remove object with that ID\n", sizeof(info));
    strcat(info, " /eobject-Edit position of object\n", sizeof(info));
    strcat(info, " /duplicateobject-Duplicate object with that ID\n", sizeof(info));
    strcat(info, " /turfspawn-Set spawn location for 4 teams\n", sizeof(info));
    strcat(info, " /portobject-Port to location of object\n", sizeof(info));
    strcat(info, ""RED"Start/Stop Turf Wars\n", sizeof(info));
    strcat(info, ""GRAY"/turfinvite-Invite players in 1 of 4 teams\n", sizeof(info));
    strcat(info, "/turfstart-Start Turf Wars\n", sizeof(info));
    strcat(info, "/turfstop-Stop Turf Wars\n", sizeof(info));
    ShowPlayerDialog(playerid, 31999, DIALOG_STYLE_MSGBOX, "Turf Wars Help", info, "Ok", "");
    return 1;
}
- Move to SQL/MYSQL & EasyDialog
This for variables is funny, no optimisation at all.
GetPlayerPoolSize is ok that will add.
Mysql I think it's not needed because this is not some big gamemode only small FS
For EasyDialog i will see

Thanks for advices
TonyVk 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
[GameMode] [GM] LS Turf Wars 2 Popo Gamemode Scripts 59 09/07/2014 02:51 PM
Turf Wars Viprous Scripting Help 1 27/12/2012 04:04 AM
TURF WARS 3 Mattias_Vuksan Filterscripts 12 01/07/2011 10:13 AM
Turf wars JerrOoenn Help Archive 0 23/07/2010 10:43 AM
Turf Wars T.I. Help Archive 3 15/05/2009 11:08 PM


All times are GMT. The time now is 04:43 PM.


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