Author Topic: Private message system  (Read 2389 times)

VetalYA

  • Guest
Private message system
« on: October 28, 2011, 01:25:51 pm »
Let me introduce myself a little bit as a scripter.

I play in SA-MP 2007 - 2009
I Script for SA-MP: 2008 - 2010
I Script in PHP (WEB) 2009 - 2011

So, i know a lot of how to write script correctly. But Squirrel is new for me. And i stuck here:

Code: [Select]
local pTemp2 = split( szParams, numb + " "  ), msg =  pTemp2[0];
Code: [Select]
else if ( szCmd == "msg" )
{
if ( !szParams ) MessagePlayer( "/msg playerid message", pPlayer );
else
{  local pTemp = split( szParams, " " ), p = GetPlayer( pTemp[ 0 ] );

if ( p )

        { 
local numb = p.ID.tointeger();
local pTemp2 = split( szParams, numb + " "  ), msg =  pTemp2[0];
MessagePlayer("PM from " + pPlayer.Name + ":" + msg , p );
PagerMessage( p, msg + " from " + pPlayer.Name, 200, 1, 1 );
}
else MessagePlayer( "playerid not found", pPlayer );
}
}

How to make function "Private message" work correctly ?



Thank you in advance.

VetalYA

  • Guest
Re: Private message system
« Reply #1 on: October 28, 2011, 05:07:19 pm »
Thank you Svenko. Without your help, I'd would never  made  this script correct. Big Thank :) :)

 

© Liberty Unleashed Team.