Hy whats up guys i am back with another creation
in this creation i am gonna give you PM chat it useful for all server i think its work like thi /pm[playerid][text].
COMMANDS:
/PM
/R its mean you can replay pm without typing /pm
CODES
Compile it first then use it i hope you understand me. make a name in filterscript PM then setname in server.cfg in filterscript line: PM Then save it.
And if you like my creation +rep me .
Thanks.
in this creation i am gonna give you PM chat it useful for all server i think its work like thi /pm[playerid][text].
COMMANDS:
/PM
/R its mean you can replay pm without typing /pm
CODES
Code:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#define Versio "1.0"
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" PM System by Ali Shan");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
new PMEnabled[MAX_PLAYERS];
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
PMEnabled[playerid] = 1;
return 1;
}
CMD:togpm( playerid, params[ ] )
{
if(isnull(params)) return SendClientMessage(playerid, 0xEDC71CFF, "CMD: /togpm [on/off]");
if(strcmp(params, "on", true ) == 0 )
{
PMEnabled[playerid] = 1;
SendClientMessage(playerid, 0x00FF00FF, "You have unblocked your Personal Messaging arrival.");
}
else if( strcmp( params, "off", true ) == 0 )
{
PMEnabled[playerid] = 0;
SendClientMessage(playerid, 0xAA3333AA, "You have blocked Personal Messages from arriving.");
}
else SendClientMessage(playerid, 0xEDC71CFF,"CMD: /togpm [on/off]");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 0 && response == 1)
{
new pName[MAX_PLAYER_NAME],gName[MAX_PLAYER_NAME],string[128];
new giveplayerid = GetPVarInt(playerid,"ClickedPlayer");
GetPlayerName(playerid,pName,sizeof pName);
GetPlayerName(giveplayerid,gName,sizeof gName);
format(string,sizeof string,"{B0B0B0}[PM]{FF0000}From {B0B0B0}%s{FF0000}: {E3BB19}%s",pName,inputtext);
SendClientMessage(giveplayerid,0xFFE615D4,string);
format(string,sizeof string,"{B0B0B0}[PM]{FF0000}Sent to {B0B0B0}%s{FF0000}: {E3BB19}%s",gName,inputtext);
SendClientMessage(playerid,0xFFE615D4,string);
return 1;
}
return 0;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
new pName[MAX_PLAYER_NAME], string[170],playerid2;
if(PMEnabled[playerid2] == 0) return SendClientMessage(playerid, 0xAFAFAFAA, "{FF0000}[PM]{AFAFAF}This player turn off his PM!");
SetPVarInt(playerid,"ClickedPlayer",clickedplayerid);
GetPlayerName(clickedplayerid,pName,sizeof(pName));
format(string,sizeof(string),"{FFFFFF}Type message which will be send to {E01B1B}%s{1BB5E0}(%d)",pName,clickedplayerid);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"{FFFFFF}PM",string,"Send","Cancel");
return 1;
}
And if you like my creation +rep me .
Thanks.