[HELP] Need Someone To Build My Filterscript
#1

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

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

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

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(playeridCOLOR_ARMY);
    }
    else if (
gTeam[playerid] == TEAM_TERRORIST)
    {
        
SetPlayerColor(playeridCOLOR_TERRORIST);
    }
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    return 
1;
}
public 
OnVehicleSpawn(vehicleid)
{
    return 
1;
}
public 
OnVehicleDeath(vehicleidkillerid)
{
    return 
1;
}
public 
OnPlayerText(playeridtext[])
{
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/mycommand"cmdtexttrue10) == 0)
    {
        
// Do something here
        
return 1;
    }
    return 
0;
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    return 
1;
}
public 
OnPlayerExitVehicle(playeridvehicleid)
{
    return 
1;
}
public 
OnPlayerStateChange(playeridnewstateoldstate)
{
    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(playeridobjectid)
{
    return 
1;
}
public 
OnPlayerPickUpPickup(playeridpickupid)
{
    return 
1;
}
public 
OnPlayerSelectedMenuRow(playeridrow)
{
    return 
1;
}
public 
OnPlayerInteriorChange(playeridnewinterioridoldinteriorid)
{
    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.
Reply
#5

Quote:
Originally Posted by DaRkAnGeL[NBK]
View Post
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(playeridCOLOR_ARMY);
    }
    else if (
gTeam[playerid] == TEAM_TERRORIST)
    {
        
SetPlayerColor(playeridCOLOR_TERRORIST);
    }
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    return 
1;
}
public 
OnVehicleSpawn(vehicleid)
{
    return 
1;
}
public 
OnVehicleDeath(vehicleidkillerid)
{
    return 
1;
}
public 
OnPlayerText(playeridtext[])
{
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/mycommand"cmdtexttrue10) == 0)
    {
        
// Do something here
        
return 1;
    }
    return 
0;
}
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    return 
1;
}
public 
OnPlayerExitVehicle(playeridvehicleid)
{
    return 
1;
}
public 
OnPlayerStateChange(playeridnewstateoldstate)
{
    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(playeridobjectid)
{
    return 
1;
}
public 
OnPlayerPickUpPickup(playeridpickupid)
{
    return 
1;
}
public 
OnPlayerSelectedMenuRow(playeridrow)
{
    return 
1;
}
public 
OnPlayerInteriorChange(playeridnewinterioridoldinteriorid)
{
    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...
Reply
#6

sorry i dont understand
Reply
#7

Quote:
Originally Posted by DaRkAnGeL[NBK]
View Post
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:

pawn Code:
#define NUMBER_ONE 1
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?
Reply
#8

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

nvm...i mistyped something wrong...
Reply
#10

Quote:
Originally Posted by Naruto_Emilio
View Post
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)