// DEATHMATCH CONTROL
// THIS SCRIPT MADE BY FRE$HKIDD, IT'S NOT AVALAIBLE TO STEAL THIS SCRIPT!! OR RELEASE IT ANYWHERE!!!!
//
#include <a_samp>
new DM = 1;
new DMed[MAX_PLAYERS];
new Float:pX, Float:pY, Float:pZ;
new Float:DeathPosX[MAX_PLAYERS];
new Float:DeathPosY[MAX_PLAYERS];
new Float:DeathPosZ[MAX_PLAYERS];
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n======================================");
print(" DEATHMATCH CONTROL By Fre$hKidd ");
print("========================================\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" DEATHMATCH CONTROL By Fre$hKidd ");
print("----------------------------------\n");
}
#endif
public OnPlayerDeath(playerid, killerid, reason)
{
if (DM == 0)
{
SendClientMessage(killerid,0xFF0000FF,"DeatMatch Isn't Allowed! , you have been forced to remove all your weapons!");
SendClientMessage(killerid,0xFF0000FF,"And you have been fined 5000$ for DeathMatching");
GivePlayerMoney(killerid,-5000);
ResetPlayerWeapons(killerid);
GetPlayerPos(playerid, pX, pY, pZ);
DeathPosX[playerid] = pX;
DeathPosY[playerid] = pY;
DeathPosZ[playerid] = pZ;
DMed[playerid] = 1;
return 1;
}
return 0;
}
public OnPlayerSpawn(playerid)
{
if (DMed[playerid] == 1)
{
DMed[playerid] = 0;
SendClientMessage(playerid,0xB1C8FBAA,"You have been Re-Spawned on your last place because you were DeathMatched !");
SendClientMessage(playerid,0xB1C8FBAA,"Refuned 5000$ !");
GivePlayerMoney(playerid, 5000);
SetPlayerPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
SetCameraBehindPlayer(playerid);
return 1;
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/enabledm", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
SendClientMessageToAll(0xFF6347AA,"DeathMatch Has been enabled for all!");
DM = 1;
return 1;
}
return SendClientMessage(playerid,0xFF6347AA,"You aren't RCON Admin !");
}
if (strcmp("/disabledm", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
SendClientMessageToAll(0xFF6347AA,"DeathMatch Has been disabled for all!");
DM = 0;
return 1;
}
return SendClientMessage(playerid,0xFF6347AA,"You aren't RCON Admin !");
}
return 0;
}
// DEATHMATCH CONTROL
// THIS SCRIPT MADE BY FRE$HKIDD, IT'S NOT AVALAIBLE TO STEAL THIS SCRIPT!! OR RELEASE IT ANYWHERE!!!!
//
|
Its a good one, but can you put a pastebin link as well? Regards.
And I am sure I saw that code somewhere else. Have you based off my filterscript? Anyways, I don't see the point to put the camera that way in this case. |
#
new Float:DeathPosX[MAX_PLAYERS];
new Float:DeathPosY[MAX_PLAYERS];
new Float:DeathPosZ[MAX_PLAYERS];
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid, pX, pY, pZ);
DeathPosX[playerid] = pX;
DeathPosY[playerid] = pY;
DeathPosZ[playerid] = pZ;
SetPlayerPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
SetPlayerCameraPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]+5);
SetPlayerCameraLookAt(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
|
1st. Pastebin link added
2nd. Well, I didn't copy anyone of this idea, mabye i was who first made it i guess :/ - I don't mean that. I mean I've made a FS including this. pawn Код:
![]() |
|
can i use it for my gm(yes you will get credits)
btw.: jantjuh long time no see? |