Jump to content

k3nw00d_kri5ty

Membru
  • Posts

    144
  • Joined

  • Last visited

    Never

Posts posted by k3nw00d_kri5ty

  1. Eu nu de azi scriptez sa nu stiu ca cat trebuie sa astept,

    Deci inainte sa incep editarea am compilat-o sa ma asigur ca totul e bine. S-a compilat in max 10 sec, avand un numar mai mare de linii, dupa ce sa scurtez sa zicem o comanda din 4 linii fac 1, deci nu asta era problema. Am rezolvat singur reluand toate comenzile si verificandu-le, e adevarat ca am uitat sa sterg unele acolade sau sa adaug, toate acestea erau in numar mare si trecea de limita de afisare a error-ilor si pawno nu le_a mai putut afisa pe toate.

  2. new CautareJucator[MAX_PLAYERS];

    OnPlayerConnect: CautareJucator[playerid] = -1;

    OnPlayerDisconnect:

    	for(new i = 0; i < GetMaxPlayers(); i++)
    	{
    		if(IsPlayerConnected(i) && CautareJucator[i] == playerid)
    		{
    			CautareJucator[i] = -1;
    			SendClientMessage(i, COLOR_YELLOW, "Jucatoru pe care il cautai a iesit de pe server !");
    		}
    	}
    
    public OnPlayerUpdate(playerid)
    {
    	if( IsPlayerConnected(playerid) )
    	{
    		if( CautareJucator[playerid] != -1 )
    		{
    			if( IsPlayerConnected(CautareJucator[playerid]) )
    			{
    				new Float:X, Float:Y, Float:Z;
    				GetPlayerPos(CautareJucator[playerid], X, Y, Z);
    				SetPlayerCheckpoint(playerid, X, Y, Z, 6);
    			}
    		}
    	}
    	return 1;
    }
    
    La Comanda sa pun asta?
    CautareJucator[playerid] = 1;

  3. CMD:find(playerid, params[])
    {
        new points, level = PlayerInfo[playerid][pDetSkill], Float:X, Float:Y, Float:Z;
        tmp = strtok(params, idx); giveplayerid = ReturnUser(tmp);
        if(PlayerInfo[playerid][pJob] != 1) return SendClientMessage(playerid, COLOR_GREY, "You are not Detective.");
    	if(UsedFind[playerid] != 0 && PlayerInfo[playerid][pDetSkill] < 401) return SendClientMessage(playerid, COLOR_GREY, "You've already searched for someone, wait 2 minutes !");
    	if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, -1, "USAGE: /find [playerid/PartOfName]");
    	if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_BROWN, "That player is not connected.");
        if(giveplayerid != INVALID_PLAYER_ID)
        {
            if(giveplayerid == playerid) return 1;
    		if(level >= 0 && level <= 50) { points = 4; }
    		else if(level >= 51 && level <= 100) { points = 6; }
    		else if(level >= 101 && level <= 200) { points = 8; }
    		else if(level >= 201 && level <= 400) { points = 10; }
    		else if(level >= 401) { points = 12; }
    	    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    		GetPlayerPos(giveplayerid, X,Y,Z);
    		SetPlayerCheckpoint(playerid, X,Y,Z, 6);
    		FindTime[playerid] = 1;
    		FindTimePoints[playerid] = points;
    		UsedFind[playerid] = 1;
    	}
        return 1;
    }

  4. Tutorial MoveObject

    Dupa cum stiti, a aparut versiunea de SA:MP 0.3d, care ne-a adus niste modificari in functia MoveObject.

    In versiunea 0.3c aceasta functie este mai 'greoaie', dupa cum a-ti observat obiectele care erau pe baza de mutat s-au bug-uit asa ca va v-oi prezenta un mic tutorial de a repara acest BUG.

    Cu acest programel puteti sa va creati obiectul: http://forum.sa-mp.com/showthread.php?t=282801

    Parametrii functiei:

    (objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0)
    objectid	ID-ul obiectului care dorim sa mutam
    Float:X		Cordonata X
    Float:Y		Cordonata Y
    Float:Z		Cordonata Z
    Float:Speed	Viteza de mutare a obiectului (unitati pe secunda)
    Float:RotX	Rotatia X a obiectului
    Float:RotY	Rotatia Y a obiectului
    Float:RotZ	Rotatia Z a obiectului
    Sa incepem: Pentru prima data trebuie sa definim obiectul, la inceputul script-ului:
    new obiect;
    Dupa care la OnGameModeInit cream obiectul:
    obiect = CreateObject(ModelObiect, Xinchis, Yinchis, Zinchis, RotatiaXinchis, RotatiaYinchis, RotatiaZinchis);
    Nota: Xinchis, Yinchis, Zinchis, RotatiaXinchis, RotatiaYinchis, RotatiaZinchis =  ne va trebui cordonatele obiectului cand bariera/poarta este inchisa. Iar acum ca sa mutam obiectul (o puneti la o comanda sau unde doriti voi):
    MoveObject(obiect, Xdeschis, Ydeschis, Zdeschis, 1, RotXdeschis, RotYdeschis, RotZdeschis)
    Nota: Xdeschis, Ydeschis, Zdeschis, 1, RotXdeschis, RotYdeschis, RotZdeschis = ne va trebui cordonatele obiectului cand bariera/poarta este deschisa. Sa nu uitam, 1 este viteza de mutare a obiectului (unitati pe secunda) Iar daca doriti sa se inchida automat bariera/poarta ne va trebui un timer:
    forward BariraSeInchide() // La inceputul script-ului;
    
    SetTimer("BariraSeInchide", 5000, false);// O punem la o comanda sau unde doriti voi
    "BariraSeInchide" - Numele functiei pentru a apela un string.
    5000 - Intervalul in milisecunde (1000 = o secunda)
    false - Daca doriti sa se repete acest timer scrieti true daca doriti sa nu se repete scrieti false
    Iar acum cream callback-ul forward-at 'BariraSeInchide':
    public BariraSeInchide()
    {
    	MoveObject(obiect,  Xinchis, Yinchis, Zinchis, 1, RotatiaXinchis, RotatiaYinchis, RotatiaZinchis)
    	return 1;
    }

    La MoveObject(obiect,  Xinchis, Yinchis, Zinchis, 1, RotatiaXinchis, RotatiaYinchis, RotatiaZinchis)

    folosim cordonatele din OnGameModeInit (ceea ce creaza obiectul)

  5. Daca ne gandim bine civilii  au pMember respectiv pLeader 0 adica gTeam[playerid] = 3 Deci va trebuii sa faci in felul urmator:

    else if (PlayerInfo[playa][pMember] == 0 || PlayerInfo[playa][pLeader] == 0)//Police Force spawn
    	{
    		SetPlayerToTeamColor(playa);
    		SetPlayerInterior(playa,6);
    		SetPlayerPos(playa, x,y,z);
    		SetPlayerFacingAngle(playa, angle);
    		PlayerInfo[playa][pInt] = interior;
    		return 1;
    	}
    Cordonatele, interiorul, FacingAngle le pui ale tale :) Daca doresti comanda /respawn ( original facut de mine >:) ) poftim:
    	if(strcmp(cmd, "/respawn", true) == 0)
    	{
    	    if(IsPlayerConnected(playerid))
    	    {
    			if(PlayerInfo[playerid][pAdmin] >= 1)
    			{
    				tmp = strtok(cmdtext, idx);
    				if(!strlen(tmp))
    				{
    					SendClientMessage(playerid, -1, "Utilizare: /respawn [Nume/ID Jucator]");
    					return 1;
    				}
    	            giveplayerid = ReturnUser(tmp);
    				if(IsPlayerConnected(giveplayerid))
    				{
    				    if(giveplayerid != INVALID_PLAYER_ID)
    				    {
    				        if(PlayerInfo[playerid][pAdmin] >= 1)
    						{
    							SpawnPlayer(giveplayerid);
    							GetPlayerName(playerid, sendername, sizeof(sendername));
    							format(string, sizeof(string),"* Ai primit respawn de Adminul %s !",sendername);
    							SendClientMessage(playerid, COLOR_YELLOW2, string);
    						}
    					}
    				} else return SendClientMessage(playerid, COLOR_GREY, "Acel jucator nu este conectat.");
    			} else return SendClientMessage(playerid, COLOR_GREY, "you are not authorized to use this command.");
    		}
    		return 1;
    	}

    Bafta la scriptat.

  6. Am scris:

    npp_save
    cd $(CURRENT_DIRECTORY)
    "D:\Jocuri\Samp\Server de Sa-mp GodFather\pawno\pawncc.exe" "$(FILE_NAME)" -; -(
    Il salvez, si la 'Console' primesc aceasta eroare:
    NPP_SAVE: C:\Program Files\Notepad++\change.log
    CD: C:\Program Files\Notepad++
    Current directory: C:\Program Files\Notepad++
    "D:\Jocuri\Samp\Server de Sa-mp GodFather\pawno\pawncc.exe" "change.log" -; -(
    Process started >>>
    change.log(1) : error 010: invalid function or declaration
    change.log(3) : error 010: invalid function or declaration
    change.log(8) : error 010: invalid function or declaration
    change.log(10) : error 010: invalid function or declaration
    change.log(15) : error 010: invalid function or declaration
    change.log(17) : error 010: invalid function or declaration
    change.log(27) : error 010: invalid function or declaration
    change.log(29) : error 010: invalid function or declaration
    change.log(38) : error 010: invalid function or declaration
    change.log(40) : error 010: invalid function or declaration
    change.log(49) : error 013: no entry point (no public functions)
    Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
    
    
    11 Errors.
    <<< Process finished.
    ================ READY ================

    Am gresit eu ceva ?:-??

  7. Sall, so... instalam MTA sa creez niste obiecte pentru server, am pus obiectele pentru 0.3c SA:MP unde trebuia, dar din nefericire dupa ce am intrat in Mta s-a incarcat intra in joc si pe cand sa apas Objects (iconitza) observ ca nu merge .. why?Hai ca ma uit in consola si vad ca imi da o gramada de erori gen:

    [21:49:56] ERROR: edf\edf.lua:552: attempt to concatenate a boolean value
    [21:49:56] ERROR: editor_main\server\interface.lua:11: call: failed to call 'edf:edfCreateElement'
    [21:49:56] INFO: Failed to create 'marker' from 'editor_main'
    [21:49:56] WARNING: edf\edf.lua:552: Bad 'resource' pointer @ 'getResourceName'(1)
    [21:49:56] ERROR: edf\edf.lua:552: attempt to concatenate a boolean value
    [21:49:56] ERROR: editor_main\server\interface.lua:11: call: failed to call 'edf:edfCreateElement'
    [21:49:56] INFO: Failed to create 'marker' from 'editor_main'
    [21:50:15] WARNING: edf\edf.lua:552: Bad 'resource' pointer @ 'getResourceName'(1)
    [21:50:15] ERROR: edf\edf.lua:552: attempt to concatenate a boolean value
    [21:50:15] ERROR: editor_main\server\interface.lua:11: call: failed to call 'edf:edfCreateElement'
    [21:50:15] INFO: Failed to create 'object' from 'editor_main'
    [21:50:16] WARNING: edf\edf.lua:552: Bad 'resource' pointer @ 'getResourceName'(1)
    [21:50:16] ERROR: edf\edf.lua:552: attempt to concatenate a boolean value
    [21:50:16] ERROR: editor_main\server\interface.lua:11: call: failed to call 'edf:edfCreateElement'
    [21:50:16] INFO: Failed to create 'object' from 'editor_main'
    [21:50:16] WARNING: edf\edf.lua:552: Bad 'resource' pointer @ 'getResourceName'(1)
    [21:50:16] ERROR: edf\edf.lua:552: attempt to concatenate a boolean value
    [21:50:16] ERROR: editor_main\server\interface.lua:11: call: failed to call 'edf:edfCreateElement'
    [21:50:16] INFO: Failed to create 'object' from 'editor_main'
    [21:50:16] WARNING: edf\edf.lua:552: Bad 'resource' pointer @ 'getResourceName'(1)
    [21:50:16] ERROR: edf\edf.lua:552: attempt to concatenate a boolean value
    [21:50:16] ERROR: editor_main\server\interface.lua:11: call: failed to call 'edf:edfCreateElement'
    [21:50:16] INFO: Failed to create 'object' from 'editor_main'
    [21:50:17] WARNING: edf\edf.lua:552: Bad 'resource' pointer @ 'getResourceName'(1)
    [21:50:17] ERROR: edf\edf.lua:552: attempt to concatenate a boolean value
    [21:50:17] ERROR: editor_main\server\interface.lua:11: call: failed to call 'edf:edfCreateElement'
    [21:50:17] INFO: Failed to create 'object' from 'editor_main'
    [21:50:17] WARNING: edf\edf.lua:552: Bad 'resource' pointer @ 'getResourceName'(1)
    [21:50:17] ERROR: edf\edf.lua:552: attempt to concatenate a boolean value
    [21:50:17] ERROR: editor_main\server\interface.lua:11: call: failed to call 'edf:edfCreateElement'
    [21:50:17] INFO: Failed to create 'object' from 'editor_main'
    [21:50:17] WARNING: edf\edf.lua:552: Bad 'resource' pointer @ 'getResourceName'(1)
    [21:50:17] ERROR: edf\edf.lua:552: attempt to concatenate a boolean value
    [21:50:17] ERROR: editor_main\server\interface.lua:11: call: failed to call 'edf:edfCreateElement'
    [21:50:17] INFO: Failed to create 'object' from 'editor_main'
    [21:50:18] WARNING: edf\edf.lua:552: Bad 'resource' pointer @ 'getResourceName'(1)
    [21:50:18] ERROR: edf\edf.lua:552: attempt to concatenate a boolean value
    [21:50:18] ERROR: editor_main\server\interface.lua:11: call: failed to call 'edf:edfCreateElement'
    [21:50:18] INFO: Failed to create 'object' from 'editor_main'
    [21:50:18] WARNING: edf\edf.lua:552: Bad 'resource' pointer @ 'getResourceName'(1)
    [21:50:18] ERROR: edf\edf.lua:552: attempt to concatenate a boolean value
    [21:50:18] ERROR: editor_main\server\interface.lua:11: call: failed to call 'edf:edfCreateElement'
    [21:50:18] INFO: Failed to create 'object' from 'editor_main'
    [21:50:18] WARNING: edf\edf.lua:552: Bad 'resource' pointer @ 'getResourceName'(1)
    [21:50:18] ERROR: edf\edf.lua:552: attempt to concatenate a boolean value
    [21:50:18] ERROR: editor_main\server\interface.lua:11: call: failed to call 'edf:edfCreateElement'
    [21:50:18] INFO: Failed to create 'object' from 'editor_main'
    [21:50:19] WARNING: edf\edf.lua:552: Bad 'resource' pointer @ 'getResourceName'(1)
    [21:50:19] ERROR: edf\edf.lua:552: attempt to concatenate a boolean value
    [21:50:19] ERROR: editor_main\server\interface.lua:11: call: failed to call 'edf:edfCreateElement'
    [21:50:19] INFO: Failed to create 'object' from 'editor_main'

    Iar in + imi da si sa instalez v1.0.5 :|, hai ca instalez de va merge .. nici asa.

    #Nu imi ziceti sa merg pe forum MTA ca nu merge sa ma inregistrez nu stiu dc :|

    Nu inchideti va rog acest topic ... am nevoie acum de ajutorul vostru.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.