PDA

View Full Version : Chat and all scripts off =(


[HHT]DRON
10/04/2012, 05:54 PM
Help me,please!Аfter death of the player,the chat and all scripts of the server is switched off.

Faisal_khan
10/04/2012, 05:59 PM
Paste your code

nickdodd25
10/04/2012, 05:59 PM
DRON;1789152']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..
public OnPlayerDeath(playerid, killerid, reason)
Callback

[HHT]DRON
10/04/2012, 06:18 PM
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;
}

[HHT]DRON
11/04/2012, 09:29 AM
what's the problem?

[HHT]DRON
11/04/2012, 12:50 PM
help me =)

nickdodd25
11/04/2012, 01:49 PM
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.