Jump to content
  • 0

Question

Posted

Cum fac un anti team kill?

Am incercat cu SetPlayerTeam da nu merge tot timpu :|.

Adica daca ai 3 playeri la groove 1 dintre ei are anti team kill iar restul nu.

Nu stiu ce sai mai fac am incercat de toate dar nu merge.

Va rog frumos ajutati-ma.

Dati-mi un tutorial sau explicatimi aici cum sa fac.

FreeMapper

13 answers to this question

Recommended Posts

Posted

poftim

public OnPlayerShootPlayer(shooter,target,Float:damage)
{
    if(PlayerInfo[shooter][pTeam] == PlayerInfo[target][pTeam])
    {
    new Float:newhealth;
    GetPlayerHealth(target, newhealth);
    newhealth = newhealth+sizeof(damage);
    SetPlayerHealth(target, newhealth);
    }
    else return 1;
    return 1;
}

Posted

N-am nevoie de un include ca sa folosesc OnPlayerShootPlayer ?

Nu.

Adaugi inaintea liniilor care ti le-a dat el linia asta:

forward OnPlayerShootPlayer(shooter,target,Float:damage);

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Posted
error 017: undefined symbol "PlayerInfo"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

FreeMapper

Posted

Adauga

new PlayerInfo[MAX_PLAYERS][pInfo];

Sus de tot, dupa culori, etc.

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Posted

undefined symbol "pInfo"

invalid array size (negative, zero or out of bounds)

undefined symbol "pTeam"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

3 Errors.

FreeMapper

Posted

=-" post="58339" timestamp="1299204448"]

Nu.

Adaugi inaintea liniilor care ti le-a dat el linia asta:

forward OnPlayerShootPlayer(shooter,target,Float:damage);

Callback-ul OnPlayerShootPlayer nu exista in a_samp.inc.

Posted

LaZ" post="58385" timestamp="1299246225"]

Callback-ul OnPlayerShootPlayer nu exista in a_samp.inc.

Stiu ca nu exista. Daca ar exista n-ar mai fi nevoie de pus forward ... etc.

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Posted

forward OnPlayerShootPlayer(shooter,target,Float:damage);

{

    if(PlayerInfo[shooter][pTeam] == PlayerInfo[target][pTeam])

    {

    new Float:newhealth;

    GetPlayerHealth(target, newhealth);

    newhealth = newhealth+sizeof(damage);

    SetPlayerHealth(target, newhealth);

    }

    else return 1;

    return 1;

}

asta plus ce o zis Vyorel

si am facut si asta daca nu merge aia...il faci o data dar a 2 oara iti da kick


SendClientMessage(killerid, COLOR_RED, "Nu teamkilling sau vei primi kick!"); 

SendDeathMessage(killerid,playerid,reason); 

SetPlayerScore(killerid,GetPlayerScore(killerid)-1); 

GivePlayerMoney(killerid, -2000); 

SetPlayerHealth(killerid,0); 

tk[killerid] ++; 

if(tk[killerid] == 2) 

{ 

SendClientMessage(killerid, COLOR_RED, "Daca mai omori o data vei primi kick!"); 

} 

if(tk[killerid] >= 3) 

{ 

new string[256]; 

new name[MAX_PLAYER_NAME]; 

GetPlayerName(killerid,name, sizeof(name)); 

printf("  %s kicked pentru teamkilling",name); 

Kick(killerid); 

format(string, sizeof(string), "Ai primit kick %s pentru teamkilling!",name); 

SendClientMessageToAll(COLOR_GREEN, string); 
}
return 1; 
}

Posted

Fa ce spune acest tutorial si vei reusi si singur! http://forum.sa-mp.com/showthread.php?t=224930&highlight=anti+team+kill

la fel iam facut si eu...e cam la fel uitate la al doilea ca e la fel

Guest
This topic is now closed to further replies.
×
×
  • 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.