SA-MP Forums Archive
[HELP] - 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] (/showthread.php?tid=100365)



[HELP] - kennyist - 04.10.2009

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;}




Re: [HELP] - SpiderPork - 04.10.2009

What errors do you get?


Re: [HELP] - Correlli - 04.10.2009

You need to put your commands at OnPlayerCommandText callback.


Re: [HELP] - kennyist - 04.10.2009

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)


Re: [HELP] - MadeMan - 04.10.2009

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;
}



Re: [HELP] - kennyist - 04.10.2009

thank you it works fine now.


Re: [HELP] - kennyist - 04.10.2009

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?


Re: [HELP] - Correlli - 04.10.2009

You need to set the correct interior-id.