Wysłany: 2013-04-12, 10:28
bali15
Wiek: 30 Na forum: 4880 dni Posty: 123
Piwa : 1
Witajcie ludziska mam taki b??d , nie jestem we frakcji policji a pisze mi na chacie takie co? :
a powinno pisa? tylko Kierowca ( ten jasnawy kolorek)
Policja za? mia?a by mie? ten niebieski lecz co? z tym nie tak
oto KOD:
Kod: public OnPlayerText(playerid, text[])
{
new string[256];
if (gTeam[playerid] == TEAM_TRUCKERS)
{
format(string, 256, "%s {FFFFFF}[Kierowca: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_LEMON, string);
}
new strin[256];
if(GetPlayerTeam(playerid) == POLICJA && DOF_GetInt(POLICJAP, PlayerName(playerid)) == 0)
SetPlayerTeam(playerid, POLICJA);
format(strin, 256, "%s {FFFFFF}[Policjant: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_BLUE, string);
}
return 0;
}
PS. ja tak na czacie zaspamowa?em aby by?o lepiej wida?
Wysłany: 2013-04-12, 12:03
|Ryder|
Wiek: 28 Na forum: 4801 dni Posty: 4
Nick w MP: Nico_DeLucci
Kod:
public OnPlayerText(playerid, text[])
{
new string[256];
if(gTeam[playerid] == TEAM_TRUCKERS)
{
format(string, 256, "%s {FFFFFF}[Kierowca: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_LEMON, string);
}
{else}
if(GetPlayerTeam(playerid) == POLICJA && DOF_GetInt(POLICJAP, PlayerName(playerid)) == 0)
SetPlayerTeam(playerid, POLICJA);
format(string, 256, "%s {FFFFFF}[Policjant: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_BLUE, string);
}
return 0;
}
Wysłany: 2013-04-12, 12:31
bali15
Wiek: 30 Na forum: 4880 dni Posty: 123
Piwa : 1
|Ryder| , co? zle jest z tym : {else} i return 0;
oraz prosi? bym jeszcze o poprawienie kodu:
Kod: public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(GetPlayerTeam(playerid) == POLICJA && DOF_GetInt(POLICJAP, PlayerName(playerid)) == 0)//sprawdzamy czy gracz wybra? skin policjanta i czy nie ma go w pliku frakcji
if (newkeys == 65536)
{
SetPlayerTeam(playerid, POLICJA);
if(IsPlayerInRangeOfPoint(playerid, 100.0, 2236.6992188, 2453.1992188, 12.5000000))
if(bramapoli_state) //if open then close
MoveObject(bramapoli, 2236.6992188, 2453.1992188, 12.5000000, 30.0);
if(IsPlayerInRangeOfPoint(playerid, 100.0, 2236.6992188, 2453.1992188, 12.5000000))
if(!bramapoli_state) //if closed then open
MoveObject(bramapoli, 2236.6992188, 2453.1992188, 7.0000000, 30.0);
bramapoli_state = !bramapoli_state;
}
bo zwyk?y kierowca mo?e u?ywa? tej cmd
Wysłany: 2013-04-12, 12:39
|Ryder|
Wiek: 28 Na forum: 4801 dni Posty: 4
Nick w MP: Nico_DeLucci
Kod: public OnPlayerText(playerid, text[])
{
new string[256];
if(gTeam[playerid] == TEAM_TRUCKERS)
{
format(string, 256, "%s {FFFFFF}[Kierowca: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_LEMON, string);
}
else if(GetPlayerTeam(playerid) == POLICJA && DOF_GetInt(POLICJAP, PlayerName(playerid)) == 0)
SetPlayerTeam(playerid, POLICJA);
format(string, 256, "%s {FFFFFF}[Policjant: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_BLUE, string);
}
return 1;
}
@UP Tego spr?buj
[ Dodano : 2013-04-12, 12:41 ]
Pomy?ka:
Kod: public OnPlayerText(playerid, text[])
{
new string[256];
if(gTeam[playerid] == TEAM_TRUCKERS)
{
format(string, 256, "%s {FFFFFF}[Kierowca: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_LEMON, string);
}
else if(GetPlayerTeam(playerid) == POLICJA && DOF_GetInt(POLICJAP, PlayerName(playerid)) == 0)
SetPlayerTeam(playerid, POLICJA);
{
format(string, 256, "%s {FFFFFF}[Policjant: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_BLUE, string);
}
return 1;
}
[ Dodano : 2013-04-12, 12:42 ]
A jak sie nie uda to tego spr?buj:
Kod: public OnPlayerText(playerid, text[])
{
new string[256];
if(gTeam[playerid] == TEAM_TRUCKERS)
{
format(string, 256, "%s {FFFFFF}[Kierowca: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_LEMON, string);
}
if(GetPlayerTeam(playerid) == POLICJA && DOF_GetInt(POLICJAP, PlayerName(playerid)) == 0)
SetPlayerTeam(playerid, POLICJA);
{
format(string, 256, "%s {FFFFFF}[Policjant: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_BLUE, string);
}
return 1;
}
A jak sie nie uda znowu to tego spr?buj:
Kod: public OnPlayerText(playerid, text[])
{
new string[256];
if(gTeam[playerid] == TEAM_TRUCKERS)
{
format(string, 256, "%s {FFFFFF}[Kierowca: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_LEMON, string);
}
else if(GetPlayerTeam(playerid) == POLICJA && DOF_GetInt(POLICJAP, PlayerName(playerid)) == 0)
SetPlayerTeam(playerid, POLICJA);
{
format(string, 256, "%s {FFFFFF}[Policjant: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_BLUE, string);
}
return 1;
}
Wysłany: 2013-04-12, 12:42
bali15
Wiek: 30 Na forum: 4880 dni Posty: 123
Piwa : 1
|Ryder| , Thx a pomo?esz to jako? mi aby dzia?a?o dla frakcji policyjnej?
Kod: public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(GetPlayerTeam(playerid) == POLICJA && DOF_GetInt(POLICJAP, PlayerName(playerid)) == 0)//sprawdzamy czy gracz wybra? skin policjanta i czy nie ma go w pliku frakcji
if (newkeys == 65536)
{
SetPlayerTeam(playerid, POLICJA);
if(IsPlayerInRangeOfPoint(playerid, 100.0, 2236.6992188, 2453.1992188, 12.5000000))
if(bramapoli_state) //if open then close
MoveObject(bramapoli, 2236.6992188, 2453.1992188, 12.5000000, 30.0);
if(IsPlayerInRangeOfPoint(playerid, 100.0, 2236.6992188, 2453.1992188, 12.5000000))
if(!bramapoli_state) //if closed then open
MoveObject(bramapoli, 2236.6992188, 2453.1992188, 7.0000000, 30.0);
bramapoli_state = !bramapoli_state;
}
Wysłany: 2013-04-12, 12:45
|Ryder|
Wiek: 28 Na forum: 4801 dni Posty: 4
Nick w MP: Nico_DeLucci
Kod:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(GetPlayerTeam(playerid) == POLICJA && DOF_GetInt(POLICJAP, PlayerName(playerid)) == 0)//sprawdzamy czy gracz wybra? skin policjanta i czy nie ma go w pliku frakcji
if (newkeys == 65536)
{
SetPlayerTeam(playerid, POLICJA);
if(IsPlayerInRangeOfPoint(playerid, 100.0, 2236.6992188, 2453.1992188, 12.5000000))
if(bramapoli_state) //if open then close
MoveObject(bramapoli, 2236.6992188, 2453.1992188, 12.5000000, 30.0);
if(IsPlayerInRangeOfPoint(playerid, 100.0, 2236.6992188, 2453.1992188, 12.5000000))
if(!bramapoli_state) //if closed then open
MoveObject(bramapoli, 2236.6992188, 2453.1992188, 7.0000000, 30.0);
bramapoli_state = !bramapoli_state;
}
return 1;
}
Wysłany: 2013-04-12, 13:00
bali15
Wiek: 30 Na forum: 4880 dni Posty: 123
Piwa : 1
|Ryder| , ale to jest to samo a mi chodzi baby zwyk?y gracz nie u?ywa? tego bo jak jestem na kierowcy to moge u?ywa?
Wysłany: 2013-04-12, 13:01
|Ryder|
Wiek: 28 Na forum: 4801 dni Posty: 4
Nick w MP: Nico_DeLucci
Kod: public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(GetPlayerTeam(playerid) == POLICJA && DOF_GetInt(POLICJAP, PlayerName(playerid)) == 0)//sprawdzamy czy gracz wybra? skin policjanta i czy nie ma go w pliku frakcji
if (newkeys == 65536)
{
SetPlayerTeam(playerid, POLICJA);
if(IsPlayerInRangeOfPoint(POLICJA, 100.0, 2236.6992188, 2453.1992188, 12.5000000))
if(bramapoli_state) //if open then close
MoveObject(bramapoli, 2236.6992188, 2453.1992188, 12.5000000, 30.0);
if(IsPlayerInRangeOfPoint(POLICJA, 100.0, 2236.6992188, 2453.1992188, 12.5000000))
if(!bramapoli_state) //if closed then open
MoveObject(bramapoli, 2236.6992188, 2453.1992188, 7.0000000, 30.0);
bramapoli_state = !bramapoli_state;
}
return 1;
}
Je?eli to nie zadzia?a to nie pomoge.
Wysłany: 2013-04-12, 14:23
bali15
Wiek: 30 Na forum: 4880 dni Posty: 123
Piwa : 1
Niestety co? jest zle ;/
KOD:
Kod:
public OnPlayerText(playerid, text[])
{
new string[256];
if(gTeam[playerid] == TEAM_TRUCKERS)
{
format(string, 256, "%s {FFFFFF}[Kierowca: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_LEMON, string);
}
else if(GetPlayerTeam(playerid) == POLICJA && DOF_GetInt(POLICJAP, PlayerName(playerid)) == 0)
SetPlayerTeam(playerid, POLICJA);
{
format(string, 256, "%s {FFFFFF}[Policjant: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_BLUE, string);
}
return 1;
}
Wysłany: 2013-04-12, 14:45
Seboo
Wiek: 30 Na forum: 5515 dni Posty: 124
Nick w MP: Sebo
Piwa : 1228
Kod:
public OnPlayerText(playerid, text[])
{
new string[256];
if(gTeam[playerid] == TEAM_TRUCKERS)
{
format(string, 256, "%s {FFFFFF}[Kierowca: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_LEMON, string);
}
else if(gTeam[playerid] == POLICJA && DOF_GetInt(POLICJAP, PlayerName(playerid)) == 0)
{
format(string, 256, "%s {FFFFFF}[Policjant: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_BLUE, string);
}
return 0;
}
Wysłany: 2013-04-12, 14:58
bali15
Wiek: 30 Na forum: 4880 dni Posty: 123
Piwa : 1
Seboo , Wszystko ok z [Kierowca] ale z [Policja] co? nie ;/ bo nic nie wida? na czacie jak sie pisze ;/
Wysłany: 2013-04-12, 15:44
Wafelowski
Wiek: 29 Na forum: 5347 dni Posty: 428
Piwa : 100
Spr?buj bez tego drugiego warunku:
Kod:
public OnPlayerText(playerid, text[])
{
new string[256];
if(gTeam[playerid] == TEAM_TRUCKERS)
{
format(string, 256, "%s {FFFFFF}[Kierowca: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_LEMON, string);
}
else if(gTeam[playerid] == POLICJA)
{
format(string, 256, "%s {FFFFFF}[Policjant: %d]: %s", PlayerName(playerid),playerid, text);
SendClientMessageToAll(COLOR_BLUE, string);
}
return 0;
}
Tagi: tekst :: czacie
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: