SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 29/07/2012, 06:05 AM   #1
[GF]Logic
Gangsta
 
[GF]Logic's Avatar
 
Join Date: Feb 2012
Posts: 497
Reputation: 27
Default Detects match results Need help

well i wanted to add something unique for my TDM server so plus the map change system i want some thing that detects if for example team one killed 1 from team two a result appears saying :

Team One : Team Two
1 : 0

so when the Team One reaches 100 kills or more before the round time finishes the map changes announcing the winner and move to the next map

i am so sleepy i will check the replies tomorrow help me please +Rep

and i would really be happy with some examples
__________________
Quote:
If you won't Respect my Religion I won't respect your's
[GF]Logic is offline   Reply With Quote
Old 29/07/2012, 06:06 AM   #2
djcabo
Big Clucker
 
djcabo's Avatar
 
Join Date: May 2012
Location: Capture Zone
Posts: 81
Reputation: 10
Default Re: Detects match results Need help

dude checkout my works on the filterscript thread!
__________________


Keep us alive -
djcabo is offline   Reply With Quote
Old 29/07/2012, 06:12 AM   #3
Kindred
High-roller
 
Join Date: Aug 2011
Posts: 1,647
Reputation: 504
Default Re: Detects match results Need help

Just an example:

pawn Code:
new TeamOneKills, TeamTwoKills;

public OnPlayerDeath(playerid, killerid, reason)
{
    if(gTeam[killerid] == Team_One) TeamOneKills ++;
    if(gTeam[killerid] == Team_Two) TeamTwoKills ++;
    if(TeamOneKills >= 100)
    {
        //Whatever happens if team 1 wins
    }
    if(TeamTwoKills >= 100)
    {
        //Whatever happens if team 2 wins
    }
    return 1;
}

Simply create a variable for the kills, and whenever the killerid on OnPlayerDeath kills someone, raise the kills of the killerid's team variable.
Kindred is offline   Reply With Quote
Old 29/07/2012, 06:28 AM   #4
[GF]Logic
Gangsta
 
[GF]Logic's Avatar
 
Join Date: Feb 2012
Posts: 497
Reputation: 27
Default Re: Detects match results Need help

Quote:
Originally Posted by Kindred View Post
Just an example:

pawn Code:
new TeamOneKills, TeamTwoKills;

public OnPlayerDeath(playerid, killerid, reason)
{
    if(gTeam[killerid] == Team_One) TeamOneKills ++;
    if(gTeam[killerid] == Team_Two) TeamTwoKills ++;
    if(TeamOneKills >= 100)
    {
        //Whatever happens if team 1 wins
    }
    if(TeamTwoKills >= 100)
    {
        //Whatever happens if team 2 wins
    }
    return 1;
}

Simply create a variable for the kills, and whenever the killerid on OnPlayerDeath kills someone, raise the kills of the killerid's team variable.

Thanks Helped i will test it tomorrow and see it works
__________________
Quote:
If you won't Respect my Religion I won't respect your's
[GF]Logic is offline   Reply With Quote
Old 29/07/2012, 07:24 AM   #5
Devilxz97
Gangsta
 
Devilxz97's Avatar
 
Join Date: Dec 2011
Location: Malaysia
Posts: 750
Reputation: 37
Default Re: Detects match results Need help

Quote:
Originally Posted by djcabo View Post
dude checkout my works on the filterscript thread!
stop advertice your works djcabo , more then 7 fs in a day , are u kidding with me ?
let me help u djcabo , i give a explaination..
if u still remember this;

Nuke Filterscript - Copied from: http://forum.sa-mp.com/showthread.php?t=223866
Neon System - Copied from: http://forum.sa-mp.com/showthread.php?t=287650
AFK/BRB system - Copied from: http://forum.sa-mp.com/showthread.php?t=332879
Glasses System - Copied from: http://forum.sa-mp.com/showthread.php?t=251105
Anti-Spammer - Copied from: http://forum.sa-mp.com/showthread.php?t=191915
SpeedBoost - Copied from: http://forum.sa-mp.com/showthread.php?t=95079

http://forum.sa-mp.com/showthread.php?t=363887 -[FS] 0.3e Simple Dialog Admin System [DCadmin]
http://forum.sa-mp.com/showthread.php?t=363867 -[FS]Dj Cabo's Dialog Register System
http://forum.sa-mp.com/showthread.php?t=363731 -[FS]Simple Speedometer
this 3 i dont found yet , but dont think i will not find it
you are a COPYCAT Learn how to script kid
__________________


- Skype Name: ejam.blacklistcrew -
- ******** Acc: http://www.********.com/DevConnection -

Selling Gamemode [DRIFT/FREEROAM/ROLEPLAY] for $9.99

Last edited by Devilxz97; 29/07/2012 at 08:05 AM.
Devilxz97 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
SQL results. iGetty Scripting Help 8 10/06/2012 04:39 PM
Admin Hiding detects commands as a unknown CMD Lorenc_ Scripting Help 4 31/08/2011 01:46 PM
My antivirus detects SAMP.exe as viruses. Help me!! junkbuster Client Support 9 01/03/2011 08:54 PM
AVG Scanner - Detects SA-MP.exe as malware caion Client Support 7 08/06/2010 02:15 PM
Function/Callback that detects... Torran Help Archive 12 24/01/2010 11:07 AM


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


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