Chat and all scripts off =(
#1

Help me,please!Аfter death of the player,the chat and all scripts of the server is switched off.
Reply
#2

Paste your code
Reply
#3

Quote:
Originally Posted by [HHT]DRON
Посмотреть сообщение
Help me,please!Аfter death of the player,the chat and all scripts of the server is switched off.
Need to show us anything in the..
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
Callback
Reply
#4

Код:
public OnPlayerSpawn(playerid)
{
if(GetPlayerSkin(playerid) == 124 || GetPlayerSkin(playerid) == 125 || GetPlayerSkin(playerid) == 126)
{
switch(Player[playerid][pVip] >= 1)
{
case 0: { SetPlayerHealth(playerid, -100.0); ForceClassSelection(playerid); SendClientMessage(playerid,-1,"Вы не VIP игрок, выбирайте другой скин!");}
}
}
new rand = random(sizeof(gRandomPlayerSpawns));
SetPlayerScore(playerid,Player[playerid][pScore]);
SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]);
SetPlayerFacingAngle(playerid, gRandomPlayerSpawns[rand][3]);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid,3500);
ShowPlayerDialog(playerid, radio, DIALOG_STYLE_MSGBOX, "Unlimited FM", "Unlimited FM - радио станция к которой подключен наш серверю\nВы хотите подключиться к радиостанции?", "Да", "Нет");
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
GivePlayerMoney(killerid,1500);
GivePlayerMoney(playerid, -0);
return 1;
}
Reply
#5

what's the problem?
Reply
#6

help me =)
Reply
#7

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
   
    if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
    {
        new VictimName[24], KillerName[24], Msg[128];
        GetPlayerName(playerid, VictimName, sizeof(VictimName));//get names of the victim
        GetPlayerName(killerid, KillerName, sizeof(KillerName));//get names of the killer
        GivePlayerMoney(killerid,1500);//your money code for the killer, i removed the victim one cause you had -0 so you dont need it there
        format(Msg, 128, "You've killed %s", VictimName);//send a message to the killer that he killed  the victim
        SendClientMessage(killerid, 0xFFFFFFFF, Msg);
        format(Msg, 128, "You've been killed by %s", KillerName);//send a message to the victim that the killer killed him.
        SendClientMessage(playerid, 0xFFFFFFFF, Msg);
        SendDeathMessage(killerid, playerid, reason);
    }
    return 1;
}
Give it a try now. It should work. It is set up almost the same as the one i am making for my stunt server.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)