hmm ... can you tell me why ?
#1

Look at this code :

Код:
   
public OnPlayerCommandText(playerid, cmdtext[])
if(strcmp("/pizzajob", cmdtext, true) == 0)
	{
    SendClientMessage(playerid,COLOR_RED, "HINT: Follow the marker on the map to get your pizzaboy job !");
		SetPlayerCheckpoint(playerid, 2083.217, 2223.526, 11.023 );
		return 0;
	}

	   if(strcmp("/towtruckjob", cmdtext, true) == 0)
	{
    SendClientMessage(playerid,COLOR_RED, "HINT: Follow the marker on the map to get your Tow truck driver job !");
		SetPlayerCheckpoint(playerid, 1942.5308, 2163.4653, 10.8203 );
		return 1;
	}
return 0;
}
But in-game when i type /pizzajob, or /towtruckjob, it shows the message, then : SERVER: Unknown Command

Can you tell me why ?
Reply
#2

edit to

Код:
   
public OnPlayerCommandText(playerid, cmdtext[])
if(strcmp("/pizzajob", cmdtext, true) == 0)
	{
    SendClientMessage(playerid,COLOR_RED, "HINT: Follow the marker on the map to get your pizzaboy job !");
		SetPlayerCheckpoint(playerid, 2083.217, 2223.526, 11.023 );
		return 1;
	}

	   else if(strcmp("/towtruckjob", cmdtext, true) == 0)
	{
    SendClientMessage(playerid,COLOR_RED, "HINT: Follow the marker on the map to get your Tow truck driver job !");
		SetPlayerCheckpoint(playerid, 1942.5308, 2163.4653, 10.8203 );
		return 1;
	}
return 0;
}
Reply
#3

Still the same problem
Reply
#4

try changing return 0; to return 1;
Reply
#5

Post whole OnPlayerCommandText by pastebin
Reply
#6

here is the whole OnPlayerCommandText .

http://pastebin.com/f42916f39

and CodeMatrix i tried, but didn't work
Reply
#7

Hmmm, have no error in OnPlayerCommandText.
But I've noticed that doesn't have "towtruckjob" in it.
Are you sure you posted right code in pastebin?
Reply
#8

if it is a filterscript, then that is why

if its a filterscript you need to go onto your Game Mode file and put in where it says OnPlayerCommandText

Код:
if (strcmp("/pizzaboy", cmdtext, true)==0) return 1;
if (strcmp("/towtruckjob", cmdtext, true)==0) return 1;
if you put that in your game mode file, then the actual server file will recognize it. If you are already in your game mode file, then i have no idea what to tell you
Reply
#9

Quote:
Originally Posted by yezizhu
Hmmm, have no error in OnPlayerCommandText.
But I've noticed that doesn't have "towtruckjob" in it.
Are you sure you posted right code in pastebin?
I just deleted the towtruckjob to test if pizzajob will work .
It's the right code
Reply
#10

Quote:
Originally Posted by Annihalation
if it is a filterscript, then that is why

if its a filterscript you need to go onto your Game Mode file and put in where it says OnPlayerCommandText

Код:
if (strcmp("/pizzaboy", cmdtext, true)==0) return 1;
if (strcmp("/towtruckjob", cmdtext, true)==0) return 1;
if you put that in your game mode file, then the actual server file will recognize it. If you are already in your game mode file, then i have no idea what to tell you
It's in the GM, not the FS

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)