[FilterScript] Turf Wars v1.0 (GTA Online)
#1

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
Reply
#2

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.
Reply
#3

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.
Reply
#4

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
Reply
#5

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.
Reply
#6

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
Reply
#7

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.
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)