SA-MP Forums Archive
Help Me Guys - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help Me Guys (/showthread.php?tid=248735)



Help Me Guys - Venice - 15.04.2011

pawn Код:
foreach(Player, i) {
        if(IsPlayerInArea(i, -352.180664, 1537.226684, -336.180664, 1553.226684)) {
            if(EnteredArea[i] == 0) {             // if he hasn'td beenterefo re
                if(gTeam[i] == TEAM_USA && CapturedBy == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy == 2 || gTeam[i] == TEAM_MERC && CapturedBy == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy == 5) {
                    SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
                    EnteredArea[i] = 1;
                }
                else {
                    SendClientMessageToAll(COLOR_CON_GREEN, "The bigear is being taken over!");
                    EnteredArea[i] = 1;           // He has entered
                    SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
                    IfCapture[i] = 1;
                    T1[i] = SetTimer("TakeOver",30000,0);
                }
            }
        }
        else {
            EnteredArea[i] = 0;                   // When he leaves, he's no longer in the area
            KillTimer(T1[i]);
        }
i need to remove this
pawn Код:
if(IsPlayerInArea(i, -352.180664, 1537.226684, -336.180664, 1553.226684))
make this to checkpoint
pawn Код:
CreateDynamicCP (-344.2773,1545.2611,75.5625, 5.5, 0, -1, -1, 50.0); // Checkpoint in the BIG Ears
Fast Reply


Re: Help Me Guys - admantis - 15.04.2011

pawn Код:
if (IsPlayerInRangeOfPoint(playerid, 50, -344.2773, 1545.2611, 75.5625)) return is_in_big_ear_check_point;



Re: Help Me Guys - Venice - 15.04.2011

pawn Код:
foreach(Player, i) {
        if (IsPlayerInRangeOfPoint[i], 50, -344.2773, 1545.2611, 75.5625)) return is_in_big_ear_check_point;
            if(EnteredArea[i] == 0) {             // if he hasn'td beenterefo re
                if(gTeam[i] == TEAM_USA && CapturedBy == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy == 2 || gTeam[i] == TEAM_MERC && CapturedBy == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy == 5) {
                    SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
                    EnteredArea[i] = 1;
                }
                else {
                    SendClientMessageToAll(COLOR_CON_GREEN, "The bigear is being taken over!");
                    EnteredArea[i] = 1;           // He has entered
                    SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
                    IfCapture[i] = 1;
                    T1[i] = SetTimer("TakeOver",30000,0);
                }
            }
        }
        else {
            EnteredArea[i] = 0;                   // When he leaves, he's no longer in the area
            KillTimer(T1[i]);
        }
errors
Код:
E:\....\3cinc\gamemodes\COD5.pwn(8205) : error 028: invalid subscript (not an array or too many subscripts): "IsPlayerInRangeOfPoint"
E:\.....\3cinc\gamemodes\COD5.pwn(8205) : warning 215: expression has no effect
E:\......\3cinc\gamemodes\COD5.pwn(8205) : error 001: expected token: ";", but found "]"
E:\.....\3cinc\gamemodes\COD5.pwn(8205) : error 029: invalid expression, assumed zero
E:\......./3cinc\gamemodes\COD5.pwn(8205) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
this is error line
Код:
if (IsPlayerInRangeOfPoint[i], 50, -344.2773, 1545.2611, 75.5625)) return is_in_big_ear_check_point;



Re: Help Me Guys - admantis - 15.04.2011

Oh my god you should learn some scripting first. You should change is_in_big_ear_check_point for what it will return so change it for this

pawn Код:
if (IsPlayerInRangeOfPoint, i, 50, -344.2773, 1545.2611, 75.5625)) {
And 'i' variable is a parameter it should go after a comma


Re: Help Me Guys - Venice - 15.04.2011

Код:
E:\.....\3cinc\gamemodes\COD5.pwn(8205) : error 076: syntax error in the expression, or invalid function call
E:\....\3cinc\gamemodes\COD5.pwn(8205) : error 029: invalid expression, assumed zero
E:\......\3cinc\gamemodes\COD5.pwn(8220) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.



Re: Help Me Guys - admantis - 15.04.2011

pawn Код:
if (IsPlayerInRangeOfPoint(i, 50, -344.2773, 1545.2611, 75.5625)) {
d


Re: Help Me Guys - Venice - 15.04.2011

Compile Good But That Not Work lol


Re: Help Me Guys - Venice - 16.04.2011

Sorry For Double Post
---------------------------
Im Try Other Same Why Errors ??

pawn Код:
if (IsPlayerInRangeOfPoint(i, 50, -543.7328, 2594.1885, 53.51565)) {
            if(EnteredArea2[i] == 0) {            // if he hasn't entered before
                if(gTeam[i] == TEAM_USA && CapturedBy2 == 1 || gTeam[i] == TEAM_GERMANY && CapturedBy2 == 2 || gTeam[i] == TEAM_MERC && CapturedBy2 == 3 || gTeam[i] == TEAM_JAPAN && CapturedBy2 == 4 || gTeam[i] == TEAM_RUSSIA && CapturedBy2 == 5) {
                    SendClientMessage(i, COLOR_RED, "This area has already been captured by your team!");
                    EnteredArea2[i] = 1;
                }
                else {
                    SendClientMessageToAll(COLOR_CON_GREEN, "The Restarunt is being taken over!");
                    EnteredArea[i] = 1;           // He has entered
                    SendClientMessage(i,COLOR_CON_GREEN, "Stay In here for 30 seconds to take over the area!");
                    IfCapture[i] = 1;
                    T1[i] = SetTimer("TakeOver",30000,0);
                }
            }
        }
errors
Код:
E:\.......\3cinc\gamemodes\COD5.pwn(8795) : error 029: invalid expression, assumed zero
E:\.....\3cinc\gamemodes\COD5.pwn(8795) : warning 215: expression has no effect
E:\.......\3cinc\gamemodes\COD5.pwn(8795) : error 001: expected token: ";", but found ")"
E:\.......\3cinc\gamemodes\COD5.pwn(8795) : error 029: invalid expression, assumed zero
E:\........\3cinc\gamemodes\COD5.pwn(8795) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
error Line
pawn Код:
if (IsPlayerInRangeOfPoint(i, 50, -543.7328, 2594.1885, 53.51565)) {



Re: Help Me Guys - PCheriyan007 - 16.04.2011

Here's an idea...
Make the checkpoint and set it up so that if a player enters it, it starts the countdown. If the player leaves the checkpoint before the timer ends it will say you have left the checkpoint and were not able to take over the restaurant. I'll post up the code later since right now I'm busy.