PM message is sending the Sender's ID
#4

PHP код:
dcmd_pm(playerid,params[])
{
   if(
GetPVarInt(id,"NoPM") == 0)
   {
   new 
id,string[256],pName[MAX_PLAYER_NAME],pName2[MAX_PLAYER_NAME], pMessage;
   if( 
sscanfparams"us[126]" idpMessage )) return SendClientMessageplayerid, -1"Usage: /pm [ID] (message)" );
   if( 
id == playerid ) return SendClientMessageplayerid, -1"You cant PM yourselfe!");
   if( 
IsPlayerConnectedid )
   {
      
GetPlayerName(playeridpNamesizeof(pName));
      
GetPlayerName(idpName2sizeof(pName2));
      
format(stringsizeof( string ), "PM From %s(%d): %s"pNameplayeridpMessage);
      
SendClientMessage(id, -1string);
      
PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
      
format(stringsizeof( string ), "PM To %s(%d): %s"pName2idpMessage);
      
SendClientMessage(playerid, -1string);
      
SetPVarInt(id,"LastID",playerid);
   }else return 
SendClientMessage(playerid, -1"That player is not connected!");
   else
   {
       
SendClientMessage(playeridCOLOR_ERROR,"ERROR: Currently, that player's PM is set to: OFF!");
       
PlayerPlaySound(playerid10530.00.00.0);
   }
   return 
1;

Reply


Messages In This Thread
PM message is sending the Sender's ID - by (_AcE_) - 27.07.2012, 19:41
Re: PM message is sending the Sender's ID - by Vince - 27.07.2012, 19:46
Re: PM message is sending the Sender's ID - by (_AcE_) - 27.07.2012, 20:25
Re: PM message is sending the Sender's ID - by Kakioshe22 - 27.07.2012, 21:53
Re: PM message is sending the Sender's ID - by Dubya - 27.07.2012, 22:13
Re: PM message is sending the Sender's ID - by Kakioshe22 - 27.07.2012, 22:17

Forum Jump:


Users browsing this thread: 2 Guest(s)