SA-MP Forums Archive
pm help - 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: pm help (/showthread.php?tid=136869)



pm help - cssbart - 26.03.2010

pm help
can you help with it please

heres the code

Код:
if(!strcmp("/pm", cmdtext, true))
{
  tmp = strtok(cmdtext,idx);
  if(!strlen(tmp)) return SendClientMessage(playerid,0xFF0000FF,"USAGE: /PM (id) (message)");
  new id = strval(tmp);
  gMessage = strrest(cmdtext,idx);
  if(!strlen(gMessage)) return SendClientMessage(playerid,0xFF0000FF,"Usage: /pm (id) (message)");		
  if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"/pm :Invalid ID");	
  GetPlayerName(id,iName,sizeof(iName));
  GetPlayerName(playerid,pName,sizeof(pName));
  format(Message,sizeof(Message),">> %s(%i): %s",iName,id,gMessage);
  SendClientMessage(playerid,0xFFD720FF,Message);
  format(Message,sizeof(Message),"** %s(%i): %s",pName,playerid,gMessage);
  SendClientMessage(id,0xFFD720FF,Message);
  PlayerPlaySound(id,1085,0.0,0.0,0.0);
  return 1;
}
it comes up with this error
Код:
C:\Users\Jonny\SAMP\gamemodes\DM.pwn(552) : warning 217: loose indentation
C:\Users\Jonny\SAMP\gamemodes\DM.pwn(592) : error 017: undefined symbol "tmp"
C:\Users\Jonny\SAMP\gamemodes\DM.pwn(593) : error 017: undefined symbol "tmp"
C:\Users\Jonny\SAMP\gamemodes\DM.pwn(594) : error 017: undefined symbol "tmp"
C:\Users\Jonny\SAMP\gamemodes\DM.pwn(595) : error 017: undefined symbol "gMessage"
C:\Users\Jonny\SAMP\gamemodes\DM.pwn(595) : error 017: undefined symbol "strrest"
C:\Users\Jonny\SAMP\gamemodes\DM.pwn(596) : error 017: undefined symbol "gMessage"
C:\Users\Jonny\SAMP\gamemodes\DM.pwn(598) : error 017: undefined symbol "iName"
C:\Users\Jonny\SAMP\gamemodes\DM.pwn(598) : error 017: undefined symbol "iName"
C:\Users\Jonny\SAMP\gamemodes\DM.pwn(598) : error 029: invalid expression, assumed zero
C:\Users\Jonny\SAMP\gamemodes\DM.pwn(598) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


10 Errors.



Re: pm help - Steven82 - 26.03.2010

Just get the one from the wiki.


http://wiki.sa-mp.com


Re: pm help - cssbart - 26.03.2010

this is the one


Re: pm help - Steven82 - 26.03.2010

hm....are you making your own script or editing?


Re: pm help - cssbart - 26.03.2010

ill upload it

Download


Re: pm help - cssbart - 27.03.2010

can any one fix that or give me a pm system



Re: pm help - XRVX - 27.03.2010

Quote:
Originally Posted by Jonny_
can any one fix that or give me a pm system
here is a released pm system
http://forum.sa-mp.com/index.php?topic=137944.0


Re: pm help - cssbart - 27.03.2010

no it need to be on a cmd like /pm [id] [message]


Re: pm help - Drake1994 - 27.03.2010

fixed:

http://pastebin.com/kTzKmanJ