SA-MP Forums Archive
Commands Dont work Anymore - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Commands Dont work Anymore (/showthread.php?tid=372973)



Commands Dont work Anymore - jereny27 - 28.08.2012

BeFore all i Just wanna say sry for my bad english ok?


*Guys This is Something Simple but Anoying that is what happens, See i was making ma Gm and i begin make Commands Maps Scripts all But NExt of a moth Of Srcripting Whe i Try to make a command On Ma Gamemode //-Example -//

if(strcmp(cmd, "/Examplee!", true) == 0) {
SendClientMessage(playerid, COLOR_GREY,"THIS IS EXAMPLE",0);
SendClientMessage(playerid, COLOR_GREY,"THIS IS EXAMPLE",0);
SendClientMessage(playerid, COLOR_GREY,"THIS IS EXAMPLE",0);

return 1;
}


ORRR


if(strcmp(cmd, "/Example", true) == 0) {
SetPlayerPos(playerid, 00000.00000,000000.000000,0000000.00000",0);
SendClientMessage(playerid, COLOR_GREY,"THIS IS EXAMPLE",0);

return 1;
}

I just Get The Error Unknow Command I donk know what Happens The Gamemode is working And i dont Have Errors Just 47 Warnings -.-Ё If the Problem Is Th warnings Help me plz :$

-*Another Problem I got Is Making A lift Just See
Up side All i tipe new Lift Next i Get The 2 Cords The cord Of the lift down and the cord of the lift Up
I put The Object Example
OnGameModeInit lift = 000000 0000000 .0 00 0000000 DONE Next i mke the commands Just Simple Move Object And When i Go to the game and Use the command Example /liftup I Get Unknow Commands Again :$



I RLY NEED HELP I WILL GIVE REP FOR ALL THE HELPERS AND SRY FOR MA BAD ENGLISH AGAIN :$


Re: Commands Dont work Anymore - jereny27 - 28.08.2012

Im Online Waiting For Help (IM ACTIVE) :$


Re: Commands Dont work Anymore - R4VER - 28.08.2012

it should be like:
Код:
if(strcmp(cmd, "/Example", true) == 10) {
SetPlayerPos(playerid, 00000.00000,000000.000000,0000000.00000",0);
SendClientMessage(playerid, COLOR_GREY,"THIS IS EXAMPLE",0);

return 1;
}



Re: Commands Dont work Anymore - jereny27 - 28.08.2012

iS ma second Thread And sry Bro :$ For The next tiime ok?


Re: Commands Dont work Anymore - fadhilkab - 28.08.2012

Use ZCMD its very fast and light and easy to use

Код:
#include <ZCMD>
#define grey					0xC0C0C0AA
CMD:killme(playerid,params[])
{  
       SendClientMessage(playerid, COLOR_GREY,"THIS IS EXAMPLE",0);
        SendClientMessage(playerid, COLOR_GREY,"THIS IS EXAMPLE",0);
        SendClientMessage(playerid, COLOR_GREY,"THIS IS EXAMPLE",0);
}
return 1;
Link For ZCMD : https://sampforum.blast.hk/showthread.php?tid=91354 "The Easiest Command Processor"


Re: Commands Dont work Anymore - jereny27 - 28.08.2012

And I have to Change The 0 For a 10?


Re: Commands Dont work Anymore - C00K13M0N$73R - 28.08.2012

pawn Код:
if(!strcmp(cmdtext, "/example", true, 7)) // 7 is the length of /example



Re: Commands Dont work Anymore - jereny27 - 28.08.2012

ohhhh Ok But If i Make A command For Example /EXAMPLEEE I have To Put A 9? answer MOnster


Re: Commands Dont work Anymore - C00K13M0N$73R - 28.08.2012

Quote:
Originally Posted by jereny27
Посмотреть сообщение
ohhhh Ok But If i Make A command For Example /EXAMPLEEE I have To Put A 9? answer MOnster
Yeah, you got it.

Good luck.


Re: Commands Dont work Anymore - R4VER - 28.08.2012

Quote:
Originally Posted by jereny27
Посмотреть сообщение
And I have to Change The 0 For a 10?
yeah its the length of the command...it sless than 10 chars most of the time and it will make your work faster if you type10...but you can put the number of your command's char too... as what cookie monster said...

Quote:
Originally Posted by C00K13M0N$73R
Посмотреть сообщение
pawn Код:
if(!strcmp(cmdtext, "/example", true, 7)) // 7 is the length of /example
and + a_samp sux :P use some other command processors it really helps you