Having problems with this Command
#1

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;
    }
Reply
#2

Have you got the right co-ords?
Reply
#3

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

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;
    }
Reply
#5

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.
Reply
#6

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

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.
Reply
#8

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

Its half and it seems to be wrong.
Reply
#9

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

Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)