[HELP] Need Someone To Build My Filterscript -
DaRkAnGeL[NBK] - 07.10.2011
Hey,
i have a problem that is really to begin to annoy me as i have a good idea for a new TDM filterscript but i have no idea how to script it, its fairly basic idea:
its based in cityhall and the object of the game is to defend your money bag while trying to retreve the other. each round will last for 5minutes unless the other team capture the moneybag and take it to there base located either top floor or bottom. each win will be decided on the amout of bags captured. at the start of a new round the is a 5second frozen countdown to make the game fair.
players can teleport to the minigame via /chdm which should spawn them at there spawn points
if a player dies in that minigame then they shall spawn back at there spawn base
there are also 2 teams Army or Terroist
oh and they leave by /chdmq
i shall give the other info like spawn points if you think you can do it

please reply
Re: [HELP] Need Someone To Build My Filterscript -
System64 - 07.10.2011
That's something like a minigame (or maybe biggame??) xD
It's pretty easy to do, just need some PAWN knowledge
Try starting you own and ask for help here if you need it!
Re: [HELP] Need Someone To Build My Filterscript -
DaRkAnGeL[NBK] - 07.10.2011

i tryed and tryed to do it my self everything went wrong so i thought i would ask

basically i need to find out how to create a team selection. how to do the whole capture the flag kinda thing and also how to spawn my players there
Re: [HELP] Need Someone To Build My Filterscript -
DaRkAnGeL[NBK] - 07.10.2011
PHP Code:
/* Army VS Terriost simple TDM filterscript which consists of two teams Army And Terriosts army are green terriosts red
the objective is simple capture the other teams money bag and take it to your base i dont mind you using this
filterscript but you must keep all credits */
#define FILTERSCRIPT
#include <a_samp>
//defines for the teams
#define TEAM_ARMY
#define TEAM_TERRORIST
#define COLOR_TERRORIST 0xB30404FF
#define COLOR_ARMY 0x005701FF
new gTeam[MAX_PLAYERS];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Army Vs Terriosts");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColor(playerid);
return 1;
}
SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == TEAM_ARMY)
{
SetPlayerColor(playerid, COLOR_ARMY);
}
else if (gTeam[playerid] == TEAM_TERRORIST)
{
SetPlayerColor(playerid, COLOR_TERRORIST);
}
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
i just tryed the team setup and fail this is the errors i get:
Code:
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\pawno\army.pwn(36) : error 029: invalid expression, assumed zero
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\pawno\army.pwn(40) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: [HELP] Need Someone To Build My Filterscript -
DreamOnIt - 07.10.2011
Quote:
Originally Posted by DaRkAnGeL[NBK]
PHP Code:
/* Army VS Terriost simple TDM filterscript which consists of two teams Army And Terriosts army are green terriosts red
the objective is simple capture the other teams money bag and take it to your base i dont mind you using this
filterscript but you must keep all credits */
#define FILTERSCRIPT
#include <a_samp>
//defines for the teams
#define TEAM_ARMY
#define TEAM_TERRORIST
#define COLOR_TERRORIST 0xB30404FF
#define COLOR_ARMY 0x005701FF
new gTeam[MAX_PLAYERS];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Army Vs Terriosts");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColor(playerid);
return 1;
}
SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == TEAM_ARMY)
{
SetPlayerColor(playerid, COLOR_ARMY);
}
else if (gTeam[playerid] == TEAM_TERRORIST)
{
SetPlayerColor(playerid, COLOR_TERRORIST);
}
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
i just tryed the team setup and fail this is the errors i get:
Code:
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\pawno\army.pwn(36) : error 029: invalid expression, assumed zero
C:\Users\Unlimited DMers\Desktop\Fas FreeRoam\pawno\army.pwn(40) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
|
pawn Code:
#define TEAM_ARMY
#define TEAM_TERRORIST
You don't say to the preprocessor what it should replace those defines with...
Re: [HELP] Need Someone To Build My Filterscript -
DaRkAnGeL[NBK] - 07.10.2011
sorry i dont understand
Re: [HELP] Need Someone To Build My Filterscript -
DreamOnIt - 07.10.2011
Quote:
Originally Posted by DaRkAnGeL[NBK]
sorry i dont understand
|
#define tell the preprocessor to replace a certain value/text with what you defined (if i can say it that way)
for example:
So now, with that define, you can just write NUMBER_ONE in your code to refer to number 1:
pawn Code:
if(PlayerInfo[playerid][pAdmin] < NUMBER_ONE) return SendClientMessage(playerid,COLOR_RED,"You are not an admin.");
Got it?
Re: [HELP] Need Someone To Build My Filterscript -
Ensconce - 07.10.2011
Please learn some basic pawn, or basic scripting in any language. Then you will understand.
What #define does is look through your script for TEAM_ARMY and replace it with whatever you asked it to replace it with during pre-compilation.
So you need to actually state what to replace TEAM_ARMY and TEAM_TERRORIST with.
#define TEAM_ARMY 1
#define TEAM_TERRORIST 2
Re : [HELP] Need Someone To Build My Filterscript -
Naruto_Emilio - 07.10.2011
nvm...i mistyped something wrong...
Re: Re : [HELP] Need Someone To Build My Filterscript -
DreamOnIt - 07.10.2011
Quote:
Originally Posted by Naruto_Emilio
pawn Code:
SetPlayerToTeamColor(playerid) { if (gTeam[playerid] = TEAM_ARMY) { SetPlayerColor(playerid, COLOR_ARMY); } else if (gTeam[playerid] = TEAM_TERRORIST) { SetPlayerColor(playerid, COLOR_TERRORIST); } }
|
That is even worst.... please read a tutorial on control structures