SA-MP Forums Archive
Having problems with this Command - 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: Having problems with this Command (/showthread.php?tid=282710)



Having problems with this Command - rangerxxll - 12.09.2011

I'm trying to make it so when people /join they get teleported to a location, and a few messages pop up and a check point appears on there map

But the only two problems are, when I do /join it says the rest of the messages except "Go to a weapons crate to get weapons. One has been marked on your map"

And the checkpoint doesn't appear on the map either.

Current code:
pawn Код:
if(strcmp(cmdtext, "/join", true) == 0)
    {
        if(PartyStarted == false) return SendClientMessage(playerid, COLOR_RED, "No one has started a event yet.");
        if(AtParty[playerid] == true) return SendClientMessage(playerid, COLOR_RED, "You're already in the event, type /leave to leave.");
        SetPlayerPos(playerid, 2169.0952,-3170.2466,190);
        SetPlayerFacingAngle(playerid, 344.3667);
        AtParty[playerid] = true;
        SetPlayerCheckpoint(playerid, 2160.5581,-3017.5974,191, 7.0);
        SendClientMessage(playerid, COLOR_GREEN, "Welcome to the Event, if you wish to leave use /leave.");
        SendClientMessage(playerid, COLOR_GREEN, "Go to a weapons crate to get weapons. One has been marked on your map");
        return 1;
    }



Re: Having problems with this Command - Yamoo - 12.09.2011

Have you got the right co-ords?


Re: Having problems with this Command - rangerxxll - 12.09.2011

Quote:
Originally Posted by Yamoo
Посмотреть сообщение
Have you got the right co-ords?
Yep.


Re: Having problems with this Command - Yamoo - 12.09.2011

Try this (but I ain't sure if it's correct nor will work (non-tested)).

pawn Код:
if(strcmp(cmdtext, "/join", true) == 0)
    {
        SetPlayerPos(playerid, 2169.0952,-3170.2466,190);
        SetPlayerFacingAngle(playerid, 344.3667);
        AtParty[playerid] = true;
        SetPlayerCheckpoint(playerid, 2160.5581,-3017.5974,191, 7.0);
        SendClientMessage(playerid, COLOR_GREEN, "Welcome to the Event, if you wish to leave use /leave.");
        SendClientMessage(playerid, COLOR_GREEN, "Go to a weapons crate to get weapons. One has been marked on your map");
        }
        else
        {
        if(PartyStarted == false);
        SendClientMessage(playerid, COLOR_RED, "No one has started a event yet.");
        {
        else if
        {
        if(AtParty[playerid] == true)
        SendClientMessage(playerid, COLOR_RED, "You're already in the event, type /leave to leave.");
        return 1;
    }



Re: Having problems with this Command - rangerxxll - 12.09.2011

Quote:
Originally Posted by Yamoo
Посмотреть сообщение
Try this (but I ain't sure if it's correct nor will work (non-tested)).

pawn Код:
if(strcmp(cmdtext, "/join", true) == 0)
    {
        SetPlayerPos(playerid, 2169.0952,-3170.2466,190);
        SetPlayerFacingAngle(playerid, 344.3667);
        AtParty[playerid] = true;
        SetPlayerCheckpoint(playerid, 2160.5581,-3017.5974,191, 7.0);
        SendClientMessage(playerid, COLOR_GREEN, "Welcome to the Event, if you wish to leave use /leave.");
        SendClientMessage(playerid, COLOR_GREEN, "Go to a weapons crate to get weapons. One has been marked on your map");
        }
        else
        {
        if(PartyStarted == false);
        SendClientMessage(playerid, COLOR_RED, "No one has started a event yet.");
        {
        else if
        {
        if(AtParty[playerid] == true)
        SendClientMessage(playerid, COLOR_RED, "You're already in the event, type /leave to leave.");
        return 1;
    }
Quote:

C:\Documents and Settings\Lucas\Desktop\Serverstuff\MyTestServerV1. 0\filterscripts\minigame2.pwn(26 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lucas\Desktop\Serverstuff\MyTestServerV1. 0\filterscripts\minigame2.pwn(26 : warning 215: expression has no effect
C:\Documents and Settings\Lucas\Desktop\Serverstuff\MyTestServerV1. 0\filterscripts\minigame2.pwn(26 : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Lucas\Desktop\Serverstuff\MyTestServerV1. 0\filterscripts\minigame2.pwn(270) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lucas\Desktop\Serverstuff\MyTestServerV1. 0\filterscripts\minigame2.pwn(270) : warning 215: expression has no effect
C:\Documents and Settings\Lucas\Desktop\Serverstuff\MyTestServerV1. 0\filterscripts\minigame2.pwn(270) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Lucas\Desktop\Serverstuff\MyTestServerV1. 0\filterscripts\minigame2.pwn(270) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lucas\Desktop\Serverstuff\MyTestServerV1. 0\filterscripts\minigame2.pwn(270) : fatal error 107: too many error messages on one line

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


6 Errors.

Get those errors for some reason, I'll try and correct them.


Re: Having problems with this Command - Yamoo - 12.09.2011

No need, it was myself who made the mistakes. I'll fix them now in a minute.


Re: Having problems with this Command - rangerxxll - 12.09.2011

Quote:
Originally Posted by Yamoo
Посмотреть сообщение
No need, it was myself who made the mistakes. I'll fix them now in a minute.
Appreciated. Saves my ass, because I'm tired as hell right now lol.


Re: Having problems with this Command - Davz*|*Criss - 12.09.2011

Rangerxxll, May i ask you where is your Z coordinate?

Its half and it seems to be wrong.


Re: Having problems with this Command - rangerxxll - 12.09.2011

Quote:
Originally Posted by Davz*|*Criss
Посмотреть сообщение
Rangerxxll, May i ask you where is your Z coordinate?

Its half and it seems to be wrong.
This is for the checkpoint
Quote:

181,2160.5581,-3017.5974,191.8781,224.6254,0,0,0,0,0,0




Re: Having problems with this Command - Davz*|*Criss - 12.09.2011

Quote:
Originally Posted by rangerxxll
Посмотреть сообщение
This is for the checkpoint
What?

EDIT: Just show me your X,Y,Z coordinates, Or else go to the place you want to show the checkpoint and type /save

Then go to Documents/Gta san andreas/SA-MP/Saved positions.txt and look up for the last on Coordinate saved as AddPlayerClass just copy the X,Y,Z of that and give it to me.