Making a simple teleport command? -
Kitten_Blind - 26.11.2010
Hello ! Im trying to make a teleport to one of my maps, i did like this:
Код:
if (strcmp("/Highway", true, 10) == 0)
{
SetPlayerPos(playerid, 1217.3299560547,1244.5386962891,7.453125);
ShowClientMessage(playerid,YELLOW,"Welcome to Las Vegas Highway !");
return 1;
}
and this error:
Код:
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(32) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(34) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(35) : error 017: undefined symbol "ShowClientMessage"
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(36) : warning 217: loose indentation
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(40) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
How to fix this please?
Re: Making a simple teleport command? -
Kitten - 26.11.2010
lol.
u have defined yellow
pawn Код:
#define YELLOW 0xFFFF00FF
but u wrote it different so change the define to this
pawn Код:
#define COLOR_YELLOW 0xFFFF00FF
Re: Making a simple teleport command? -
Kitten_Blind - 26.11.2010
Yeah sorry fixed that but new errors, i updated first post..
This forum requires that you wait 120 seconds between posts. Please try again in 88 seconds. -.- have been like 3 mins -.-
Re: Making a simple teleport command? -
IstuntmanI - 26.11.2010
Put the command under
OnPlayerCommandText and
ShowClientMessage must be
SendClientMessage
Re: Making a simple teleport command? -
FreshDoubleX - 26.11.2010
Define:
pawn Код:
#define YELLOW 0xF5DEB3AA
pawn Код:
if (strcmp("/Highway", true, 10) == 0)
{
SetPlayerPos(playerid, 1217.3299560547,1244.5386962891,7.453125);
SendClientMessage(playerid,YELLOW,"Welcome to Las Vegas Highway !");
return 1;
}
Re: Making a simple teleport command? -
Kitten_Blind - 26.11.2010
Okey thank you! now it looks like this:
Код:
#define NICE_BLUE 0xa0d3ffAA
#define GREEN 0x21DD00FF
#define RED 0xE60000FF
#define ADMIN_RED 0xFB0000FF
#define YELLOW 0xFFFF00FF
#define ORANGE 0xF97804FF
#define LIGHTRED 0xFF8080FF
#define LIGHTBLUE 0x00C2ECFF
#define PURPLE 0xB360FDFF
#define PLAYER_COLOR 0xFFFFFFFF
#define BLUE 0x1229FAFF
#define LIGHTGREEN 0x38FF06FF
#define DARKPINK 0xE100E1FF
#define DARKGREEN 0x008040FF
#define ANNOUNCEMENT 0x00CACAFB
#define AFK 0x6AF7E1FF
#define COLOR_SYSTEM 0xEFEFF7AA
#define PLAYER_VIEW 0xC0C0C0FF
#define COLOR_GRAD1 0xB4B5B7FF
#define NICESKY 0x99FFFFAA
#define GRAY 0xCECECEFF
#define purple 0xC2A2DAAA
///////////////////////////////////////////////////
#include <a_samp>
#include <streamer>
public OnFilterScriptInit()
{
public OnPlayerCommandText()
if (strcmp("/Highway", true, 10) == 0)
{
SetPlayerPos(playerid, 1217.3299560547,1244.5386962891,7.453125);
SendClientMessage(playerid,YELLOW,"Welcome to Las Vegas Highway !");
return 1;
}
but that only gave me more errors tho..
Код:
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(32) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(32) : error 004: function "OnPlayerCommandText" is not implemented
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(34) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(34) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(36) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(37) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(38) : warning 217: loose indentation
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(42) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Errors.
Re: Making a simple teleport command? -
Kitten - 26.11.2010
show me those lines.
EDIT: oops
pawn Код:
#include <a_samp>
#include <streamer>
#define NICE_BLUE 0xa0d3ffAA
#define GREEN 0x21DD00FF
#define RED 0xE60000FF
#define ADMIN_RED 0xFB0000FF
#define YELLOW 0xFFFF00FF
#define ORANGE 0xF97804FF
#define LIGHTRED 0xFF8080FF
#define LIGHTBLUE 0x00C2ECFF
#define PURPLE 0xB360FDFF
#define PLAYER_COLOR 0xFFFFFFFF
#define BLUE 0x1229FAFF
#define LIGHTGREEN 0x38FF06FF
#define DARKPINK 0xE100E1FF
#define DARKGREEN 0x008040FF
#define ANNOUNCEMENT 0x00CACAFB
#define AFK 0x6AF7E1FF
#define COLOR_SYSTEM 0xEFEFF7AA
#define PLAYER_VIEW 0xC0C0C0FF
#define COLOR_GRAD1 0xB4B5B7FF
#define NICESKY 0x99FFFFAA
#define GRAY 0xCECECEFF
#define purple 0xC2A2DAAA
///////////////////////////////////////////////////
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Highway", true, 10) == 0)
{
SetPlayerPos(playerid, 1217.3299560547,1244.5386962891,7.453125);
SendClientMessage(playerid,YELLOW,"Welcome to Las Vegas Highway !");
return 1;
}
return 0;
}
Re: Making a simple teleport command? -
RenisiL - 26.11.2010
Код:
#define GREEN 0x21DD00FF
#define RED 0xE60000FF
#define ADMIN_RED 0xFB0000FF
#define YELLOW 0xFFFF00FF
#define ORANGE 0xF97804FF
#define LIGHTRED 0xFF8080FF
#define LIGHTBLUE 0x00C2ECFF
#define PURPLE 0xB360FDFF
#define PLAYER_COLOR 0xFFFFFFFF
#define BLUE 0x1229FAFF
#define LIGHTGREEN 0x38FF06FF
#define DARKPINK 0xE100E1FF
#define DARKGREEN 0x008040FF
#define ANNOUNCEMENT 0x00CACAFB
#define AFK 0x6AF7E1FF
#define COLOR_SYSTEM 0xEFEFF7AA
#define PLAYER_VIEW 0xC0C0C0FF
#define COLOR_GRAD1 0xB4B5B7FF
#define NICESKY 0x99FFFFAA
#define GRAY 0xCECECEFF
#define purple 0xC2A2DAAA
///////////////////////////////////////////////////
#include <a_samp>
#include <streamer>
public OnFilterScriptInit()
{
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Highway", true, 10) == 0)
{
SetPlayerPos(playerid, 1217.3299560547,1244.5386962891,7.453125);
SendClientMessage(playerid,YELLOW,"Welcome to Las Vegas Highway !");
return 1;
}
return 0;
}
Re: Making a simple teleport command? -
Kitten_Blind - 26.11.2010
Ok i got 3 errors with Kittys tip and 5 with RenisiLґs one so ill stick to Kittys
i got these errors
Код:
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(38) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(48) : error 021: symbol already defined: "AddStaticVehicleEx"
C:\Documents and Settings\Administratцr\Skrivbord\Untitled.pwn(367) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
and heres line 367.. xP
EDIT: Sorry forgot line 48.
Код:
AddStaticVehicleEx(411,1231.29089355,1267.73071289,6.53437471,0.00000000,-1,-1,15); //Infernus
Re: Making a simple teleport command? -
Kitten - 26.11.2010
Heres the one i tested compiles fine
pawn Код:
#include <a_samp>
#include <streamer>
#define NICE_BLUE 0xa0d3ffAA
#define GREEN 0x21DD00FF
#define RED 0xE60000FF
#define ADMIN_RED 0xFB0000FF
#define YELLOW 0xFFFF00FF
#define ORANGE 0xF97804FF
#define LIGHTRED 0xFF8080FF
#define LIGHTBLUE 0x00C2ECFF
#define PURPLE 0xB360FDFF
#define PLAYER_COLOR 0xFFFFFFFF
#define BLUE 0x1229FAFF
#define LIGHTGREEN 0x38FF06FF
#define DARKPINK 0xE100E1FF
#define DARKGREEN 0x008040FF
#define ANNOUNCEMENT 0x00CACAFB
#define AFK 0x6AF7E1FF
#define COLOR_SYSTEM 0xEFEFF7AA
#define PLAYER_VIEW 0xC0C0C0FF
#define COLOR_GRAD1 0xB4B5B7FF
#define NICESKY 0x99FFFFAA
#define GRAY 0xCECECEFF
#define purple 0xC2A2DAAA
///////////////////////////////////////////////////
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/highway", cmdtext, true, 9) == 0)
{
SetPlayerPos(playerid, 1217.3299560547,1244.5386962891,7.453125);
SendClientMessage(playerid,YELLOW,"Welcome to Las Vegas Highway !");
return 1;
}
return 0;
}