// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #pragma tabsize 0 #include <a_samp> #define weaponmenu 1 #if defined FILTERSCRIPT public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print(" Macedonian Server !!!"); print("----------------------------------\n"); } #endif public OnGameModeInit() { SetGameModeText("MKD Skopje"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 154.18991088867, -1951.9382324219, 51.34375); SetPlayerCameraPos(playerid, 154.13497924805, -1944.8223876953, 51.34375); SetPlayerCameraLookAt(playerid, 154.13497924805, -1944.8223876953, 51.34375); return 1; } public OnPlayerConnect(playerid) { return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerSpawn(playerid) { return 1; } public OnPlayerDeath(playerid, killerid, reason) { new playercash; if(killerid == INVALID_PLAYER_ID) { SendDeathMessage(INVALID_PLAYER_ID,playerid,reason); ResetPlayerMoney(playerid); } else { SendDeathMessage(killerid,playerid,reason); SetPlayerScore(killerid,GetPlayerScore(killerid)+1); playercash = GetPlayerMoney(playerid); if (playercash > 0) { GivePlayerMoney(killerid, playercash); ResetPlayerMoney(playerid); } else { } } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/rules", cmdtext, true, 10) == 0) { SendClientMessage(playerid, 0xFF0000AA, "Hello! This is not DM Server if admin catch you going against the rules u will be permamently banned!"); SendClientMessage(playerid, 0xFF0000AA, "Please Respect the rules..."); SendClientMessage(playerid, 0xFF0000AA, "You can kill player if he rob/rape you"); SendClientMessage(playerid, 0xFF0000AA, "Enjoy Playing In This Server!!!"); return 1; } return 0; } public OnPlayerEnterCheckpoint(playerid) { if(IsPlayerInRangeOfPoint(playerid, 2.5, 1929.91796875, -1776.3956298828, 12.467615127563)) { SetPlayerPos(playerid, 2543.462646,-1308.379882,1026.728393); SetPlayerInterior(playerid, 2); SendClientMessage(playerid, 0x00FF00, "Welcome In The Building."); } else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1498.4581298828, -1586.6020507813, 13.546875)) { SetPlayerPos(playerid, 2527.654052,-1679.388305,1015.498596); SetPlayerInterior(playerid, 1); SendClientMessage(playerid, 0x00FF00, "Welcome In The Building."); } else if(IsPlayerInRangeOfPoint(playerid, 2.0, 1788.3591308594, -1292.9477539063, 13.57178401947)) { SetPlayerPos(playerid, 1775.5197753906, -1302.20703125, 119.83050537109); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0x00FF00, "Welcome In The Building."); } else if(IsPlayerInRangeOfPoint(playerid, 2.0, 1788.3591308594, -1292.9477539063, 13.57178401947)) ShowPlayerDialog(playerid, weaponmenu, DIALOG_STYLE_LIST, "Weapons Menu", "\nShawn-Off" "\nTec9" "\nArmor" "\nSniper", "Select", "Cancel"); return 1; } public OnPlayerUpdate(playerid) { if(IsPlayerInRangeOfPoint(playerid, 10.0, 1929.91796875, -1776.3956298828, 12.467615127563)) SetPlayerCheckpoint(playerid,1929.91796875, -1776.3956298828, 12.467615127563, 2.5); else if(IsPlayerInRangeOfPoint(playerid, 10.0, 1498.4581298828, -1586.6020507813, 13.546875)) SetPlayerCheckpoint(playerid, 1498.4581298828, -1586.6020507813, 13.546875, 3.0); else if(IsPlayerInRangeOfPoint(playerid, 10.0, 1788.3591308594, -1292.9477539063, 13.57178401947)) SetPlayerCheckpoint(playerid, 1788.3591308594, -1292.9477539063, 13.57178401947, 2.0); else if(IsPlayerInRangeOfPoint(playerid, 8.0, 1788.3591308594, -1292.9477539063, 13.57178401947)) SetPlayerCheckpoint(playerid, 1788.3591308594, -1292.9477539063, 13.57178401947, 2.0); return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == weaponmenu) { if(response) { if(listitem == 0) { GivePlayerWeapon(playerid, 26, 5004); return 1; } if(listitem == 1) { GivePlayerWeapon(playerid, 32, 5100); return 1; } if(listitem == 2) { SetPlayerArmour(playerid, 100.0); return 1; } if(listitem == 3) { GivePlayerWeapon(playerid, 34, 5000); } } } return 1; }
"Weapons Menu\nShawn-Off\nTec9\nArmor\nSniper"
if(IsPlayerInRangeOfPoint(playerid, 2.5, 1929.91796875, -1776.3956298828, 12.467615127563)) //if player is near that location
{
SetPlayerPos(playerid, 2543.462646,-1308.379882,1026.728393); //teleport player
SetPlayerInterior(playerid, 2); //set interrior
SendClientMessage(playerid, 0x00FF00, "Welcome In The Building."); //Send message
}
//IsPLayerInRangeOfPoint etc (same)
if(IsPlayerInRangeOfPoint(playerid, 2.5, 1929.91796875, -1776.3956298828, 12.467615127563)) //if player is near that location
{
GivePlayerWeapon(playerid,38,500); //gives player minigun xD with 500 bullets
}
ok man i want to can't enter in the checkpoint with car !
Do u understand ? o_0 :S |
if(IsPlayerInRangeOfPoint(playerid, 2.5, 1929.91796875, -1776.3956298828, 12.467615127563))
{
if (!IsPlayerInAnyVehicle(playerid))
{
SetPlayerPos(playerid, 2543.462646,-1308.379882,1026.728393);
SetPlayerInterior(playerid, 2);
SendClientMessage(playerid, 0x00FF00, "Welcome In The Building.");
}
}