SA-MP Forums Archive
2 problems - 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: 2 problems (/showthread.php?tid=143141)



2 problems - sansko - 21.04.2010

hey everyone,

i have 2 little problems
the first one is that i can't find the object id of the yellow downwarts pointing marker,
the second is that i don't get an massege anymore if i use an wrong command

i hope you can help me

thanks in advance


Re: 2 problems - Babul - 21.04.2010

1. i only know the ID of the white "diamond": 1559
2. make sure that each OnPlayerCommandText() callback ends with
Код:
return 0;
else it will implicate that your command was processed succesfully (with return 1; at the end), your filterscripts should return 0; at last, too.



Re: 2 problems - sansko - 21.04.2010

thanks it will be usefull


Re: 2 problems - DJDhan - 21.04.2010

Код:
if(!strcmp(cmdtext, "/me", true, 3))
			{
			  if(cmdtext[3] == 0) {
			  SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
			  return 1;
			  }
			  new str[128];
			  GetPlayerName(playerid, str, sizeof(str));
			  format(str, sizeof(str), " %s %s ", str, cmdtext[4]);
			  SendClientMessageToAll(COLOR_GOLD, str);
			  return 1;
			}
Take a look at the /me command and maybe you can learn about the wron command part.
Use an else after all the commands that are defined...if he types anything else with a slash behind then it shows Server:Unknow Command....i think it does that by defualt

Second : Use ----> [SA-MP WIKI<---- and search for pickup ids.

Hope it Helps