Help about DM script Please read
#1

Here i'm going to make DM script for my server, a make map, cmd for tp, but when some players who have slow PC type cmd they fall down under object where need to spawn, and i need to have when player type /dm1 to freeze him I have this script
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/dm1", cmdtext, true, 10) == 0)
	{
	SetPlayerPos(playerid, 1712.4000488281,-1086.8,2638.9);
	SendClientMessage(playerid, 0x32CD32AA, "Welcome to KINGINA's Map, Try to survive, Type /dminfo for info and /reclass to leave DM");
	GivePlayerWeapon(playerid, 27, 10000);//combat shotgun
	GivePlayerWeapon(playerid, 31, 10000);//m4
	GivePlayerWeapon(playerid, 29, 10000);//mp5
	GivePlayerWeapon(playerid, 24, 10000);//deagle
	GivePlayerWeapon(playerid, 34, 10000);//sniper
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "{00ff00} %s has teleported to the deathmach arena!!!! (Type /dm1 to join him!!!) ", pname);
SendClientMessageToAll(playerid, string);
Can anyone say how to make to player greeze to objects can load
And 1 more thing. Where to put when player kill someone to he get money

rep + if you help me (without error)
Reply
#2

You need to freeze the player, and then unfreeze
Reply
#3

yea i know thet 2 but still need code.
Reply
#4

This is for money

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/dm1", cmdtext, true, 10) == 0)
    {
    SetPlayerPos(playerid, 1712.4000488281,-1086.8,2638.9);
    SendClientMessage(playerid, 0x32CD32AA, "Welcome to KINGINA's Map, Try to survive, Type /dminfo for info and /reclass to leave DM");
    GivePlayerWeapon(playerid, 27, 10000);//combat shotgun
    GivePlayerWeapon(playerid, 31, 10000);//m4
    GivePlayerWeapon(playerid, 29, 10000);//mp5
    GivePlayerWeapon(playerid, 24, 10000);//deagle
    GivePlayerWeapon(playerid, 34, 10000);//sniper
    GivePlayerMoney(killerrid, 1500) // You can change 1500 with your price what you want.
    }

    new string[256], pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "{00ff00} %s has teleported to the deathmach arena!!!! (Type /dm1 to join him!!!) ", pname);
    SendClientMessageToAll(playerid, string);
    return 1;
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason) //This code gets called when somebody dies.
{
  if(IsPlayerConnected(killerid)) //Checks if there really is a "killer" - more ways of death are for example falling from great heights, so there isn't a killer there!
  {
    GivePlayerMoney(killerid, 1500); //Give the player 1500 dollars
  }
  return 1;
}
Reply
#5

Just use TogglePlayerControllable and SetTimerEx
Reply
#6

Thanks to all
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)