SA-MP Forums

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

 
 
Thread Tools Display Modes
Old 24/01/2010, 11:25 PM   #1
-Rebel Son-
High-roller
 
-Rebel Son-'s Avatar
 
Join Date: Apr 2008
Location: The south.
Posts: 1,024
Reputation: 33
Default Checkpoint problem??

I made a checkpoint for my objective mode, but i want to make it where it restarts the server when the correct team touch's it.

heres my code : i want it to stop team 1 from activating it. and only team 2 to activate it.

Code:
public OnPlayerEnterCheckpoint(playerid)
{
GetPlayerTeam(playerid);
if(gTeam[playerid] == 1)
{
SendClientMessage(playerid,COLOR_GREEN, "You are the rong team!");
}
else
{
GameTextForPlayer(playerid, "|PRISONERS WIN|", 2500, 5);
return 1;
}
__________________
XFIRE: Dhambley || MSN: truth420@live.com || Volunteer FireFighter/EMS, Rep me for saving lives!
-Rebel Son- is offline  
Old 24/01/2010, 11:57 PM   #2
LuxurioN™
High-roller
 
LuxurioN™'s Avatar
 
Join Date: Oct 2007
Posts: 1,062
Reputation: 119
Default Re: Checkpoint problem??

Try this (Not Tested):

pawn Code:
public OnPlayerEnterCheckpoint(playerid)
{
if(gTeam[playerid] == FIRST_TEAM) //EX: TEAM_GREEN
{
SendClientMessage(playerid,COLOR_GREEN, "You are the rong team!");
return;
}
else if(gTeam[playerid] == SECOND_TEAM) //EX: TEAM_BLUE
{
GameTextForPlayer(playerid, "|PRISONERS WIN|", 2500, 5);
//WIN FUNCTION... (Ex:GameModeExit();
return;
}
}
LuxurioN™ is offline  
Old 25/01/2010, 12:16 AM   #3
-Rebel Son-
High-roller
 
-Rebel Son-'s Avatar
 
Join Date: Apr 2008
Location: The south.
Posts: 1,024
Reputation: 33
Default Re: Checkpoint problem??

yeah it works, but i cant get ongamemodexit to work.
they touch it, but it doesnt restart :S
__________________
XFIRE: Dhambley || MSN: truth420@live.com || Volunteer FireFighter/EMS, Rep me for saving lives!
-Rebel Son- is offline  
Old 25/01/2010, 12:19 AM   #4
LuxurioN™
High-roller
 
LuxurioN™'s Avatar
 
Join Date: Oct 2007
Posts: 1,062
Reputation: 119
Default Re: Checkpoint problem??

Use:
pawn Code:
public OnPlayerEnterCheckpoint(playerid)
{
if(gTeam[playerid] == FIRST_TEAM) //EX: TEAM_GREEN
{
SendClientMessage(playerid,COLOR_GREEN, "You are the rong team!");
return;
}
else if(gTeam[playerid] == SECOND_TEAM) //EX: TEAM_BLUE
{
GameTextForPlayer(playerid, "|PRISONERS WIN|", 2500, 5);
GameModeExit();
return;
}
}
LuxurioN™ is offline  
Old 25/01/2010, 12:58 AM   #5
-Rebel Son-
High-roller
 
-Rebel Son-'s Avatar
 
Join Date: Apr 2008
Location: The south.
Posts: 1,024
Reputation: 33
Default Re: Checkpoint problem??

it works, i didnt put it in the right place, :P

One more question, How do it when a player dies, they are frozen, and then when all the teams players are frozen they loose?

like.. all of team a's players are frozen, team b wins the round!
__________________
XFIRE: Dhambley || MSN: truth420@live.com || Volunteer FireFighter/EMS, Rep me for saving lives!
-Rebel Son- is offline  
 

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
Checkpoint problem aircombat Help Archive 7 05/06/2010 03:29 PM
Checkpoint problem [Bm]rap45 Help Archive 4 05/02/2010 03:08 AM
Checkpoint problem killdahobo99 Help Archive 5 14/07/2009 02:42 PM
problem with checkpoint Pawno_Master Help Archive 18 04/07/2009 12:05 PM
Problem with Checkpoint! reflexion Help Archive 0 20/06/2009 09:25 PM


All times are GMT. The time now is 06:42 PM.


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