public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
return 1;
}
public OnPlayerConnect(playerid)
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has joined the server. Welcome!",pName);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new
string[64],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
switch(reason)
{
case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);
case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);
case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);
}
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
public OnPlayerCommandText( playerid, cmdtext[] )
{
if( strcmp( cmdtext, "/ban", true ) == 0 )
{
// Bans the player who executed this command and includes a reason ("Request")
BanEx( playerid, "Request" );
return 1;
}
}
public OnPlayerCommandText( playerid, cmdtext[] )
{
if( strcmp( cmdtext, "/kick", true ) == 0 )
{
// Kicks the player who the executed this command
Kick( playerid );
return 1;
}
}
public OnPlayerDeath(playerid, killerid, reason)
{
new string[32];
//Award $10,000 to the killer
GivePlayerMoney(killerid, 10000);
format(string, sizeof(string), "You now have %d.", GetPlayerMoney(killerid));
SendClientMessage(killerid, 0xFFFFFFAA, string);
playerskin = GetPlayerSkin(playerid);
|
Originally Posted by adsy
most of them are complete copies of the wiki
|