SA-MP Forums Archive
Help with time - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with time (/showthread.php?tid=315468)



Help with time - BlacKxStory - 03.02.2012

hi guys can some scrept like that time her (if player n checkpoint he stay 30 sec to capture this zone )



PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
  if(
PlayerCP[playerid] != -1) return OnPlayerEnterStreamedCheckpoint(playeridPlayerCP[playerid]);
  return 
1;
}
stock OnPlayerEnterStreamedCheckpoint(playeridCPiD)
{
    if(
CPiD == CPS1)
    {
        
GameTextForPlayer(playerid"Stay her to capture hospital!"30003);
        if(
gTeam[playerid]==TEAM_Latino)
        {
        
GangZoneShowForAll(Hospital,0x00F3FFAF);
        
SetPlayerScore(playerid,GetPlayerScore(playerid)+);
        
GivePlayerMoney(playerid,6000);
        
SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
        
GiveTeamScore(gTeam[playerid]=TEAM_Latino1);
        
SendTeamMessage(COLOR_GREEN"You received 1 Score For a Capture!",TEAM_Latino);
         } 



Re: Help with time - -ExG-VirusKiller - 03.02.2012

Set 2 timers.One to check if he remains there and 1 to capture.


Re: Help with time - MP2 - 03.02.2012

Quote:
Originally Posted by -ExG-VirusKiller
Посмотреть сообщение
Set 2 timers.One to check if he remains there and 1 to capture.
No need.

Set a timer on enter (1 second - 1000MS), kill it on exit. Use a variable to track how many times the timer has been called. Capture at 30 or whatever.




Re : Help with time - BlacKxStory - 03.02.2012

add it their please in my gamemode can some i send him my gamemode and he add it ? in PM


Re: Help with time - MP2 - 03.02.2012

Why are you bothering to learn to script if you don't even attempt?


Re : Help with time - BlacKxStory - 03.02.2012

plesae dude i need it


Re: Help with time - -ExG-VirusKiller - 03.02.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
No need.

Set a timer on enter (1 second - 1000MS), kill it on exit. Use a variable to track how many times the timer has been called. Capture at 30 or whatever.

Nice Image MP2.


Re: Re : Help with time - MP2 - 03.02.2012

Quote:
Originally Posted by BlacKxStory
Посмотреть сообщение
plesae dude i need it
Sorry, find someone else. I don't do things for people.
Go away, learn PAWN, attempt it, if you run in to problems THEN come post back here. You can't expect everything to be handed to you on a golden platter.
Not sure if I should be using this langauge, because probability says you won't understand me.


Re : Help with time - BlacKxStory - 03.02.2012

OMG guys some other scripter can help me please


Re: Re : Help with time - thimo - 03.02.2012

Quote:
Originally Posted by BlacKxStory
Посмотреть сообщение
OMG guys some other scripter can help me please
You are stupid... LEARN its all explained and you think everyone wants to do everything for you... No one will since you dont learn shit from it.