A few questions?
#2

Quote:
Originally Posted by DeltaAirlines12
1. How do I make it so if a player types "/reclass", it sends them into the player class selection?
Here you go:

pawn Код:
if(strcmp("/reclass", cmdtext, true, 7) == 0)
{
  ForceClassSelection(playerid); // Sends them to the player class selection.
  SetPlayerHealth(playerid,0);
  return 1;
}
Quote:
Originally Posted by DeltaAirlines12
2. How do I make it so if a play kills another player and the other play is the same skin, it makes the killers score -1
Here you go:

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  if(GetPlayerSkin(killerid) == GetPlayerSkin(playerid))
  {
     SetPlayerScore(killerid,GetPlayerScore(killerid) - 1) // Makes the killer's score - 1.
  }
  else
  {
    SetPlayerScore(killerid,GetPlayerScore(killerid) + 1) // Makes the killer's score + 1.
  }
  return 1;
}
Quote:
Originally Posted by DeltaAirlines12
3. How would I make it so if a player has - 10,000 dollars, the player is kicked, it sends a message saying you have been kicked due to debt, and it sends a message to the other players saying that person was kicked due to being in debt.
Here you go:

pawn Код:
SetTimer("MoneyCheck", 5000, 1); // Put this under OnGameModeInit callback.

public MoneyCheck() // Put this at the bottom of your script.
{
  for(new i = 0; i < 1000; i++)
  {
     if(GetPlayerMoney(i) <= -10000)
     {
       new playername[MAX_PLAYER_NAME], string[48];
       GetPlayerName(i, playername, sizeof(playername));
       format(string, sizeof(string), "SERVER: %s has kicked due to being in debt.", playername);
       SendClientMessageToAll(0xFFFF00AA, string);
       Kick(i);
     }
   }
   return 1;
}
Quote:
Originally Posted by DeltaAirlines12
4. Anyone know the scripting code to add a /pm command into your server?
Look in the base.pwn filterscript.
Reply


Messages In This Thread
A few questions? - by DeltaAirlines12 - 09.12.2009, 02:20
Re: A few questions? - by Zeromanster - 09.12.2009, 02:53
Re: A few questions? - by bigcomfycouch - 09.12.2009, 03:02

Forum Jump:


Users browsing this thread: 1 Guest(s)