22.01.2017, 18:09
So guys, you know this is my filterscript DeathMatch Arena.... by the way i tried to add to my server, and when i uploaded it, there isn't any checkpoint showing, just mapicon... any help? here the code:
PHP код:
/*
Death Match Arena FilterScript
By: RyderX
*/
#include <a_samp>
#include <zcmd>
#include <a_actor>
#define FILTERSCRIPT
#define DIALOG_DM 15
new bool:onCheck[MAX_PLAYERS];
new DM[MAX_PLAYERS];
public OnFilterScriptInit()
{
CreateObject(1459, 849.76630, -1386.33789, 13.26280, 0.00000, 0.00000, 0.00000);
CreateObject(1459, 852.28003, -1384.89758, 13.22480, 0.40000, 0.16000, 30.09720);
CreateObject(6296, 858.57196, -1366.85461, 14.83800, 0.00000, 0.00000, 90.00000);
CreateObject(967, 866.55573, -1384.35535, 12.61930, 0.00000, 0.00000, 270.00000);
CreateObject(3472, 846.23114, -1389.41882, 12.61930, 0.00000, 0.00000, 0.00000);
CreateObject(3472, 869.02191, -1358.37830, 12.61930, 0.00000, 0.00000, 0.00000);
CreateObject(3472, 869.64117, -1389.42529, 12.89570, 0.00000, 0.00000, 0.00000);
CreateObject(3472, 850.69269, -1362.99597, 12.88340, 0.00000, 0.00000, 0.00000);
CreateObject(3461, 865.26288, -1373.29041, 13.88340, 0.00000, 0.00000, 0.00000);
CreateObject(3461, 851.87781, -1373.33972, 13.88340, 0.00000, 0.00000, 0.00000);
CreateActor(177, 862.037475, -1372.082275, 13.546875, 175.936630);//Here you can changed the skinid of the Actor
CreateActor(176, 855.092590, -1371.912597, 13.628181, 185.650085);//here too.(0 <> 311)
Create3DTextLabel("Death Match - Arenas", 0x00FF00FF, 858.4816,-1371.1626,13.5469, 40.0, 0, 0);
Create3DTextLabel("Grenade DM", 0x00FF00FF, -1401.8314,107.3241,1032.2734, 40.0, 0, 0);
Create3DTextLabel("Sawn-Off DM", 0x00FF00FF, 1412.6399,-1.7875,1000.9244, 40.0, 0, 0);
Create3DTextLabel("Deset Eagle DM", 0x00FF00FF, 1302.5199,-1.7875,1001.0283, 40.0, 0, 0);
Create3DTextLabel("Shotgun & Deagle DM", 0x00FF00FF, 288.745971,169.350997,1007.171875, 40.0, 0, 0);
return 1;
}
public OnPlayerConnect(playerid)
{
SetPlayerMapIcon(playerid, 23, -2172.2852,251.8176,35.3387, 23, 2, MAPICON_LOCAL);
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerCheckpoint(playerid, -2172.2852,251.8176,35.3387, 2.0);
onCheck[playerid] = true;
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(onCheck[playerid]) // if it's true
{
DisablePlayerCheckpoint(playerid);
ShowPlayerDialog(playerid, DIALOG_DM, DIALOG_STYLE_LIST, "{00ff00}Death Match - Arenas", "{00ffff}-DeathMatch Stadium(All in one)\n{ff0000}-Sawn-off DeathMatch\n{ff9900}-Desert Eagle DeathMatch\n{ffff00}-Shotgun & Deagle DeathMatch\n{ff3399}-Grenade DeathMatch\n", "Select", "Close");
onCheck[playerid] = false;
}
return 1;
}
CMD:tp(playerid,params[])
{
SetPlayerPos(playerid, -2172.2852,251.8176,35.3387);
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_DM)
{
if(response) // If they clicked 'Select' or double-clicked a weapon
{
switch(listitem)
{
case 0:
{
new string[128]; new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
SetPlayerPos(playerid, -975.975708,1060.983032,1345.671875);
SetPlayerInterior(playerid, 10);
DM[playerid] = 1;
GivePlayerWeapon(playerid, 24, 50000);
GivePlayerWeapon(playerid, 26, 50000);
GivePlayerWeapon(playerid, 28, 50000);
GivePlayerWeapon(playerid, 34, 50000);
GivePlayerWeapon(playerid, 31, 50000);
GivePlayerWeapon(playerid, 16, 50000);
SetPlayerWantedLevel(playerid, 0);
format(string, sizeof(string), "[ARENA] {FFFFFF}%s has joined Death Match Stadium!",name);
SendClientMessageToAll(0x00ECECFF, string);
SendClientMessage(playerid, 0x00ECECFF, "[ARENA] {FFFFFF}You've joined DM arena, Type /leavedm if you want to leave it.");
}
case 1:
{
new string[128]; new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
SetPlayerPos(playerid, 1412.639892,-1.787510,1000.924377);
SetPlayerInterior(playerid, 1);
DM[playerid] = 1;
GivePlayerWeapon(playerid, 26, 50000);
SetPlayerWantedLevel(playerid,0);
format(string, sizeof(string), "[ARENA] {FFFFFF}%s has joined Sawn-off DeathMatch!",name);
SendClientMessageToAll(0x00ECECFF, string);
SendClientMessage(playerid, 0x00ECECFF, "[ARENA] {FFFFFF}You've joined DM arena, Type /leavedm if you want to leave it.");
}
case 2:
{
new string[128]; new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
SetPlayerPos(playerid,1302.519897,-1.787510,1001.028259);
SetPlayerInterior(playerid, 18);
DM[playerid] = 1;
GivePlayerWeapon(playerid, 24, 50000);
SetPlayerWantedLevel(playerid,0);
format(string, sizeof(string), "[ARENA] {FFFFFF}%s has joined Desert-Eagle DeathMatch!",name);
SendClientMessageToAll(0x00ECECFF, string);
SendClientMessage(playerid, 0x00ECECFF, "[ARENA] {FFFFFF}You've joined DM arena, Type /leavedm if you want to leave it.");
}
case 3:
{
new string[128]; new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
SetPlayerPos(playerid,288.745971,169.350997,1007.171875);
SetPlayerVirtualWorld(playerid, 3);
DM[playerid] = 1;
GivePlayerWeapon(playerid, 24, 50000);
GivePlayerWeapon(playerid, 25, 50000);
SetPlayerWantedLevel(playerid,0);
format(string, sizeof(string), "[ARENA] {FFFFFF}%s has joined Desert-Eagle & ShotGun DeathMatch!",name);
SendClientMessageToAll(0x00ECECFF, string);
SendClientMessage(playerid, 0x00ECECFF, "[ARENA] {FFFFFF}You've joined DM arena, Type /leavedm if you want to leave it.");
}
case 4:
{
new string[128]; new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
SetPlayerPos(playerid, -1401.829956,107.051300,1032.273437);
SetPlayerInterior(playerid, 1);
DM[playerid] = 1;
GivePlayerWeapon(playerid, 16, 50000);
SetPlayerWantedLevel(playerid,0);
format(string, sizeof(string), "[ARENA] {FFFFFF}%s has joined Grenades DeathMatch!",name);
SendClientMessageToAll(0x00ECECFF, string);
SendClientMessage(playerid, 0x00ECECFF, "[ARENA] {FFFFFF}You've joined DM arena, Type /leavedm if you want to leave it.");
}
}
}
return 1;
}
return 0;
}
CMD:leavedm(playerid, params[])
{
new string[128]; new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(DM[playerid] == 0)
{
SendClientMessage(playerid, 0x00ECECFF, "[ARENA] {FFFFFF}You are not at the DM arena!");
return 1;
}
else if(DM[playerid] == 1)
{
DM[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, 0x00ECECFF, "[ARENA] {FFFFFF}You have left the DM arena!");
format(string, sizeof(string), "[ARENA] {FFFFFF}%s has left Death Match Arena!",name);
SendClientMessageToAll(0x00ECECFF, string);
SpawnPlayer(playerid);
return 1;
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(DM[playerid] == 1)
{
new string[128]; new name[MAX_PLAYER_NAME]; new name2[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(killerid, name2, sizeof(name2));
format(string, sizeof(string)," %s(ID:%i) Fucked and pwn3d %s(ID:%i)",name, playerid, name2, killerid);
SendClientMessageToAll(0xF568F48F, string);
}
return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(DM[playerid] == 1)
{
if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
{
new string[64];
new name[MAX_PLAYER_NAME];
new name2[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(issuerid, name2, sizeof(name2));
SetPlayerHealth(playerid, 0.0);
format(string, sizeof(string), "[HEADSHOT]: {F27D0C}%s(%i) Has HeadShotted %s(%i) And Received +2 Scores And +20000$", name2, issuerid, name, playerid);
SendClientMessageToAll(0xF490F49F, string);
GameTextForPlayer(playerid,"~r~~r~~r~You were headshotted!",5000, 3); //Sets Gametext to the damage receiver.
GameTextForPlayer(issuerid,"~g~~g~~g~Headshot!~r~~r~~r~ +2 score!",5000, 3); //Sets Gametext to the damage issuer.
SetPlayerScore(issuerid, GetPlayerScore(issuerid) + 2); //Gives score to the damage issuer.
GivePlayerMoney(issuerid, 20000);
SetPlayerWantedLevel(issuerid, 6);
new
infoString[128],
weaponName[24],
victimName[MAX_PLAYER_NAME],
attackerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, victimName, sizeof (victimName));
GetPlayerName(issuerid, attackerName, sizeof (attackerName));
GetWeaponName(weaponid, weaponName, sizeof (weaponName));
format(infoString, sizeof(infoString), "%s has made %.0f damage to %s, weapon: %s", attackerName, amount, victimName, weaponName);
SendClientMessageToAll(-1, infoString);
}
}
return 1;
}