[HELP]
#1

im newish to scripting can anyone tell me why i keep getting errors for this and how to fix it.

Quote:

#include <a_samp>

#define COLOR_TURQ 0x00A3C0AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_PURPLE 0x9900FFAA
#define COLOR_BROWN 0x993300AA
#define COLOR_ORANGE 0xFF9933AA
#define COLOR_CYAN 0x99FFFFAA
#define COLOR_TAN 0xFFFFCCAA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_KHAKI 0x999900AA
#define COLOR_LIME 0x99FF00AA
#define COLOR_BLACK 0x000000AA
#define COLOR_TURQ 0x00A3C0AA

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("EK teleports");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
if(!strcmp("/lib1", cmdtext, true))
{
SetPlayerPos(playerid, -735.5619504, 484.351318, 1371.952270);
SetPlayerFacingAngle(playerid, 11.5);
SendClientMessage(playerid, 0x050CFAFF, liberty city outside);
return 1;
}
{
if (strcmp("/tele", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_YELLOW,"-------->Teleport List<--------");
SendClientMessage(playerid,COLOR_GREY,"/lib1");
SendClientMessage(playerid,COLOR_GREY,"");
SendClientMessage(playerid,COLOR_GREY,"");
SendClientMessage(playerid,COLOR_GREY,"");
SendClientMessage(playerid,COLOR_GREY,"");
SendClientMessage(playerid,COLOR_GREY,"");
SendClientMessage(playerid,COLOR_GREY,"");
}
return 1;
}
return 0;}

Reply
#2

What errors do you get?
Reply
#3

You need to put your commands at OnPlayerCommandText callback.
Reply
#4

Quote:
Originally Posted by SpiderPork
What errors do you get?
i get: C:\Users\tristan\Desktop\swat\filterscripts\EKtele ports.pwn(33) : error 010: invalid function or declaration
C:\Users\tristan\Desktop\swat\filterscripts\EKtele ports.pwn(3 : error 010: invalid function or declaration
C:\Users\tristan\Desktop\swat\filterscripts\EKtele ports.pwn(41) : error 010: invalid function or declaration
C:\Users\tristan\Desktop\swat\filterscripts\EKtele ports.pwn(52) : error 010: invalid function or declaration
C:\Users\tristan\Desktop\swat\filterscripts\EKtele ports.pwn(54) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

and were do you put the public OnPlayerCommandText(playerid, cmdtext[]) . (if its that)
Reply
#5

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp("/lib1", cmdtext, true))
    {
        SetPlayerPos(playerid, -735.5619504, 484.351318, 1371.952270);
        SetPlayerFacingAngle(playerid, 11.5);
        SendClientMessage(playerid, 0x050CFAFF, liberty city outside);
        return 1;
    }
    if (strcmp("/tele", cmdtext, true) == 0)
    {
        SendClientMessage(playerid,COLOR_YELLOW,"-------->Teleport List<--------");
        SendClientMessage(playerid,COLOR_GREY,"/lib1");
        SendClientMessage(playerid,COLOR_GREY,"");
        SendClientMessage(playerid,COLOR_GREY,"");
        SendClientMessage(playerid,COLOR_GREY,"");
        SendClientMessage(playerid,COLOR_GREY,"");
        SendClientMessage(playerid,COLOR_GREY,"");
        SendClientMessage(playerid,COLOR_GREY,"");
        return 1;
    }
    return 0;
}
Reply
#6

thank you it works fine now.
Reply
#7

1 last thing ive tried to get the tleport to LC but it just end up falling , ive tried lots of differant co'ords from samp wiki , scripts but none work , has anyone got a reason or co'ords?
Reply
#8

You need to set the correct interior-id.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)