09.09.2010, 17:50
i have maked some check points and dialog stules so i have problem..
when ill tupe /teleports and when ill click some location gives me guns because i make one dialog with guns when player will enter in check point so in every check point when ill enter showed me the dialog menu with guns but the guns and the telports are in 2 scripts not in 1..
take a look:
This is script with the checkpoints and guns:
And this is the script with teleports:
Please help !!!
and some1 tell me how i can make this in "pawn code" on forum
Thanks !
when ill tupe /teleports and when ill click some location gives me guns because i make one dialog with guns when player will enter in check point so in every check point when ill enter showed me the dialog menu with guns but the guns and the telports are in 2 scripts not in 1..
take a look:
This is script with the checkpoints and guns:
Код:
// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include <a_samp> #define weaponmenu 1 #if defined FILTERSCRIPT public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); } #endif public OnGameModeInit() { return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); 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("/enter", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, 2807.619873,-1171.899902,1025.570312); SetPlayerInterior(playerid, 8); if(IsPlayerInRangeOfPoint(playerid, 1, 1125.7376708984, -2036.9096679688, 69.880401611328)) CreatePickup(1273, 1, 1125.7376708984, -2036.9096679688, 69.880401611328, 0); 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, 1832.5821533203, -1275.8985595703, 119.60692596436)) 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, 1832.5821533203, -1275.8985595703, 119.60692596436)) SetPlayerCheckpoint(playerid, 1832.5821533203, -1275.8985595703, 119.60692596436, 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; }
Код:
// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include <a_samp> #define teleportmenu 1 #if defined FILTERSCRIPT #endif public OnPlayerCommandText(playerid, cmdtext[]) { if (!strcmp(cmdtext, "/teleport", true)) { ShowPlayerDialog(playerid, teleportmenu, DIALOG_STYLE_LIST, "Teleport Menu", "\nDM Area" "\nStunt Area" "\nRace Area" "\nDrift Area" "\nAdmin Area", "Select", "Cancel"); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == teleportmenu) { if(response) { if(listitem == 0) //DM AREA { SetPlayerPos(playerid, -975.975708,1060.983032,1345.671875); SetPlayerInterior(playerid, 10); SendClientMessage(playerid, 0xAA3333AA, "Welcome In DM Area"); return 1; } if(listitem == 1) //STUNT AREA { SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET"); } if(listitem == 2) //RACE AREA { SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET"); } if(listitem == 3) //DRIFT AREA { SendClientMessage(playerid, 0xAA3333AA, "NOT SCRIPTED YET"); } if(listitem == 4) //ADMIN AREA { SetPlayerPos(playerid, -2879.232421875, 455.7958984375, 4.8951416015625); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xAA3333AA, "Welcome, In Admin Area. Enjoy In The Admin Area"); } } } return 1; }
and some1 tell me how i can make this in "pawn code" on forum
Thanks !