#include <a_samp>#include <dcallbacks>#if MAX_PLAYERS != 30#undef MAX_PLAYERS#define MAX_PLAYERS 30#endifnew spawnhely;new bool:inSpawnZone[MAX_PLAYERS];public OnFilterScriptInit(){ spawnhely = GangZoneCreate(2161.597900, 1078.483398, 2075.333740, 988.435058); return 1;}public OnPlayerConnect(playerid){ inSpawnZone[playerid] = false; return 1;}public OnPlayerSpawn(playerid){ inSpawnZone[playerid] = true; return 1;}public OnPlayerUpdate(playerid){if(inSpawnZone[playerid] == true) SetPlayerArmedWeapon(playerid,0);return 1;}public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid){if(inSpawnZone[playerid] == true){ if(weaponid == 0 && (0 <= issuerid <= 30)) { SetPlayerHealth(issuerid,0); SendClientMessage(issuerid,0xFF0000FF,\"Meghaltál mert olyan helyen sebeztél másokat ahol tilos\"); }}return 1;}OnPlayerEnterArea(playerid,areaid){if(areaid == spawnhely)inSpawnZone[playerid] = true;return 1;}OnPlayerLeaveArea(playerid,areaid){if(areaid == spawnhely)inSpawnZone[playerid] = false;return 1;}
OnPlayerLeaveArea(playerid,areaid){ if(areaid == spawnhely)inSpawnLeave[playerid] = false; return 1;
OnPlayerLeaveArea(playerid,areaid){ if(areaid == spawnhely)inSpawnLeave[playerid] = false; return 1; Szerintem, 100% nem jó de próbálkozok mivel tanuló scripter vagyok
public OnPlayerUpdate(playerid){if(inSpawnZone[playerid] == true){SetPlayerArmedWeapon(playerid,0);}return 1;}
OnPlayerEnterArea(playerid,areaid){if(areaid == spawnhely){inSpawnZone[playerid] = true;}return 1;}OnPlayerLeaveArea(playerid,areaid){if(areaid == spawnhely){inSpawnZone[playerid] = false;}return 1;}
hát nem...mert a tiedbe nem volt kapcsos zárójel...Dupla hozzászólás automatikusan összefûzve. ( 2012. december 28. - 18:39:00 )Ha nem raksz zárójelet nem tud mit kezdeni vele ...Velem is volt már így.
if(asd == 1) Kick(playerid);
if(asd == 1) { Kick(playerid); }
if(asd == 1)SendClientMessage(playerid, -1, \"Kickelve lettél\"), Kick(playerid);
if(asd == 1) { SendClientMessage(playerid, -1,\"Kickelve lettél\");Kick(playerid);}
OnPlayerEnterArea(playerid,areaid) { }OnPlayerLeaveArea(playerid,areaid) { }
stock OnPlayerEnterArea(playerid, areaid){if(areaid == spawnhely)inSpawnZone[playerid] = true;return 1;}
stock OnPlayerLeaveArea(playerid, areaid){if(areaid == spawnhely)inSpawnZone[playerid] = false;return 1;}
public OnPlayerSpawn(playerid){OnPlayerEnterArea(playerid);return 1;}
stock OnPlayerEnterArea(playerid, areaid){if(areaid == spawnhely)inSpawnZone[playerid] = true;return 1;} stock OnPlayerLeaveArea(playerid, areaid){if(areaid == spawnhely)inSpawnZone[playerid] = false;return 1;} public OnPlayerSpawn(playerid){OnPlayerEnterArea(playerid);return 1;} és így?
/** DCallbacks 1.1* (c) Copyright 2006 by DracoBlue** @author : DracoBlue (http://dracoblue.com)* @date : 26th July 2006* @update : 25th November 2007** This file is provided as is (no warranties).** Feel free to use it, a little message in* about box is honouring thing, isn\'t it?**/#if defined _dcallbacks_included #endinput#endif#define _dcallbacks_included#pragma library dcallbacks// Update the following line to make more areachecks possible.#define MAX_AREAS_TO_CHECK 100forward TIMER_DCallbacks();new Float:AREACHECK_Coords[MAX_AREAS_TO_CHECK][4];new AREACHECK_Player[MAX_PLAYERS];new AREACHECK_Count=0;/** Return the AreaId, starts with 1 not 0.*/stock AddAreaCheck(Float:x_min,Float:x_max,Float:y_min,Float:y_max) {AREACHECK_Coords[AREACHECK_Count][0]=x_min;AREACHECK_Coords[AREACHECK_Count][1]=x_max;AREACHECK_Coords[AREACHECK_Count][2]=y_min;AREACHECK_Coords[AREACHECK_Count][3]=y_max;AREACHECK_Count++;return AREACHECK_Count;}public TIMER_DCallbacks() {new i,z;new Float:x,Float:y,Float:zcoord;for (i=0;i<MAX_PLAYERS;i++) {if (IsPlayerConnected(i)) { GetPlayerPos(i,x,y,zcoord); for (z=0;z<AREACHECK_Count;z++) { if ( (AREACHECK_Coords[z][0]<x)&&(AREACHECK_Coords[z][1]>x) && (AREACHECK_Coords[z][2]<y)&&(AREACHECK_Coords[z][3]>y) ) { if (z!=AREACHECK_Player-1) { // Is new in this area AREACHECK_Player=z+1; OnPlayerEnterArea(i,z+1); } } else { if (z==AREACHECK_Player-1) { // Player was in this Area OnPlayerLeaveArea(i,z+1); AREACHECK_Player=0; } } }} }}
Nem lehet,hogy elavult az include?
Vagy egyáltalán lehet ilyet csinálni? [/quote]Lehet igen..Csak nem futnak le ezek: OnPlayerEnterArea(playerid,areaid) { }OnPlayerLeaveArea(playerid,areaid) { }