Command fix
#1

When i type /racedelete it teleports me to /desertcoaster how i can fix that? anyone know?
Reply
#2

post both of those commands
Reply
#3

well /racedelete command does not exist bud it should say Server:unknown Command and here is the command for /desertcoaster
Код:
if (strcmp(cmdtext,"/desertcoaster", true , 3 ) ==0)
	{
	SetPlayerPos(playerid,-282.6749,2633.1079,62.7912);
        new string[64], pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
        format(string,sizeof string,"%s has joined /desertcoaster.",pName);
        SendClientMessageToAll(yellow,string);
 	SendClientMessage(playerid,red,"Welcome To Desert Coaster");
	return 1;
	}
Reply
#4

Код:
if (strcmp(cmdtext,"/desertcoaster", true , 3 ) ==0)
Learn what this means!
Reply
#5

what 3 means?
Reply
#6

3 stands for the max length of the cell, in this case, you are saying that the length of the command is only 3 cells long, meaning that your command is actually "/de"

Replace it with this:
pawn Код:
if(strcmp(cmdtext, "/desertcoaster", true) == 0)
https://sampwiki.blast.hk/wiki/strcmp
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)