Commands Dont work Anymore
#1

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 :$
Reply
#2

Im Online Waiting For Help (IM ACTIVE) :$
Reply
#3

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

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

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

And I have to Change The 0 For a 10?
Reply
#7

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

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)