Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2012-02-24, 10:13


Biker_







Wiek: 29
Na forum: 5246 dni
Posty: 126

Piwa: 16

Respekt: 50

Chcia?bym zrobi? ?eby w chacie id by?o widoczne przed nickiem a nie po
Pomo?e kto? i powie jak to zrobi? ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-24, 13:55


MG303







Wiek: 30
Na forum: 6418 dni
Posty: 654

Piwa: 2990

Respekt: 231,6
Respekt: 231,6Respekt: 231,6

To chyba musia?oby by? co? takiego:

Kod:

new TAG[128];
format(TAG, sizeof(TAG),"[%d] %s: %s", playerid, PlayerName(playerid), text);
SendClientMessageToAll(playerid, -1, TAG);


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-24, 14:46


Biker_







Wiek: 29
Na forum: 5246 dni
Posty: 126

Piwa: 16

Respekt: 50

C:\Users\Vaaz\Desktop\Street\gamemodes\PSS.pwn(280) : error 021: symbol already defined: "format"
Pisze ?e zdefiniowany a ja nie moge tego znale?? co zrobi? ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-24, 14:48


MG303







Wiek: 30
Na forum: 6418 dni
Posty: 654

Piwa: 2990

Respekt: 231,6
Respekt: 231,6Respekt: 231,6

Gdzie to doda?e??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-24, 14:50


Biker_







Wiek: 29
Na forum: 5246 dni
Posty: 126

Piwa: 16

Respekt: 50

Na pocz?tek mapki ko?o new'?w czy mam to wrzuci? do jakiego? publica ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-24, 15:32


DumpeR







Wiek: 30
Na forum: 5330 dni
Posty: 171
Nick w MP: dumpeer

Piwa: 1026

Respekt: 48,3

Do public'a OnPlayerText.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-24, 15:41


Biker_







Wiek: 29
Na forum: 5246 dni
Posty: 126

Piwa: 16

Respekt: 50

Mam 1 error
C:\Users\Vaaz\Desktop\Street\gamemodes\PSS.pwn(2638) : error 035: argument type mismatch (argument 2)
jak dodam bez tej linijki to nic si? nie dzieje

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-24, 15:55


MG303







Wiek: 30
Na forum: 6418 dni
Posty: 654

Piwa: 2990

Respekt: 231,6
Respekt: 231,6Respekt: 231,6

Biker_, poka? ca?y ten public

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-02-24, 15:58


Biker_







Wiek: 29
Na forum: 5246 dni
Posty: 126

Piwa: 16

Respekt: 50

Kod:

public OnPlayerText(playerid, text[])
{
if(GetPVarInt(playerid, "MutedPlayer"))//jesli jest uciszony
{
SendClientMessage(playerid, C_RED, "Nie mo?esz pisa? na chacie! Jestes uciszony!");
format(String128, sizeof(String128), "MUTE: %s (ID:%d): %s", PlayerName(playerid), playerid, text);
SendClientMessageToAdmins(C_GOLD, String128);
return 0;
}

if(!GetPVarInt(playerid, "MutedPlayer") && IsPlayerRegisteredAndNotLogin(playerid))//Gdy gracz jest zarejestrowany, ale nie zalogowany
{
format(String128, sizeof(String128),"(%d)(niezalogowany): %s", playerid, text);
SendPlayerMessageToAll(playerid, String128);
return 0;
}

if(!IsAdminPlayer(playerid))
{
if(AntySpam == 1)
{
if(!IsVIPPlayer(playerid))
{
if(GetPVarInt(playerid, "SpamChatCount") >= 10)
{
SendClientFormatMessageToAll(C_RED, "%s zosta? wyrzucony z serwera przez: Anty Spam.", PlayerName(playerid));
SendClientFormatMessageToAll(C_RED, "Pow?d: Pr?ba zaspamienia chatu");
Kick(playerid);
}
if(GetPVarInt(playerid, "SpamChatCount") > 2)
{
SendClientFormatMessage(playerid, C_RED, " ***Aby m?c zn?w pisa? poczekaj %d sekund.", GetPVarInt(playerid, "SpamChatCount") - 3);
AddPVarInt(playerid, "SpamChatCount", 1);
return 0;
}
AddPVarInt(playerid, "SpamChatCount", 1);
}
}
if(AntySlowa == 1)
{
for(new s = 0; s < Licz_Slow; s++)
{
new pos;
while((pos = strfind(text,Bluzgi[s],true)) != -1) for(new i = pos, j = pos + strlen(Bluzgi[s]); i < j; i++)
{
text[i] = '*';
}
}
}
}

new tmp[128];

#if defined UZYJ_MAFIA
if(text[0] == '`')
{
if(IsPlayerInAnyMafia(PlayerName(playerid)))
{
Split(GetMafiaPlayers(GetPlayerMafia(PlayerName(playerid)), " ", 3), MafiaPlayers, ' ');

strdel(text, 0, 1);
format(String128, sizeof(String128), "[MafiaChat]:%s(%d): %s", PlayerName(playerid), playerid, text);

new g=0;
while(strlen(MafiaPlayers[g]))
{
if(IsPlayerConnected(GetPlayerIDFromName(MafiaPlayers[g])))
{
SendClientMessage(GetPlayerIDFromName(MafiaPlayers[g]), GetMafiaColorByte(GetPlayerMafia(PlayerName(playerid))), String128);
}
g++;
}

for(new e=0; e<MP; e++)
{
if(IsPlayerConnected(e) && IsAdminPlayer(e) && GetPVarInt(e, "MafiaEYE") == 1 && e != playerid)
{
SendClientFormatMessage(e, 0x00ffaaFF, "@Mafia-EYE:%s:%s(%d): %s", GetPlayerMafia(PlayerName(playerid)), PlayerName(playerid), playerid, text);
}
}
}
return 0;
}
#endif

new TAG[128];
format(TAG, sizeof(TAG),"[%d] %s: %s", playerid, PlayerName(playerid), text);
SendClientMessageToAll(playerid, -1, TAG);

if(text[0] == '!')
{
if(IsVIPPlayer(playerid) || IsAdminPlayer(playerid))
{
format(tmp, sizeof(tmp), ""h_YELLOW">> Vip %s(ID:%d): "h_WHITE"%s", PlayerName(playerid), playerid, text[1]);
SendClientMessageToVIP(-1, tmp);
return 0;
}
}

if(text[0] == '@')
{
if(IsAdminPlayer(playerid))
{
format(tmp, sizeof(tmp), ""h_LIGHTRED">> Admin %s(ID:%d): "h_WHITE"%s", PlayerName(playerid), playerid, text[1]);
SendClientMessageToAdmins(-1, tmp);
return 0;
}
}

if(text[0] == '#')
{
if(IsHeadPlayer(playerid))
{
format(tmp, sizeof(tmp), ""h_LIGHTBLUE">> HeadAdmin %s(ID:%d): "h_WHITE"%s", PlayerName(playerid), playerid, text[1]);
SendClientMessageToHead(-1, tmp);
return 0;
}
}

ToLog("Chat", "%s(ID:%d) -> %s", PlayerName(playerid), playerid, text);

if(AntyReklamaWWW(text) || SearchIP(text))
{
AddPVarInt(playerid, "ProbaReklamy", 1);
SendClientMessage(playerid, C_RED, "Je?eli chcesz reklamowa?, to nie tutaj!");

if(GetPVarInt(playerid, "ProbaReklamy") == 3)
{
SendClientFormatMessageToAll(C_RED, "%s pr?bowa? reklamowa? ip serwera lub stron? www! Zosta? on wyrzucony!", PlayerName(playerid));
Kick(playerid);
}
return 0;
}

new BigChars;
for(new Char = 0; Char < strlen(text); Char++)
{
if(text[Char] >= 'A' && text[Char] <= 'Z')
{
BigChars++;
}
}

new str3[128];//Dodaje ID na chacie - to zawsze na ko?cu!

if(IsAdminPlayer(playerid))
{
format(str3, 128, "[%d][Admin]: %s", playerid, text);
}
else
if(IsVIPPlayer(playerid))
{
format(str3, 128, "[%d][VIP]: %s", playerid, text);
}
else
{
if(BigChars >= (strlen(text)/2) && strlen(text) >= 5)
{
format(str3, sizeof(str3), "[%d]: %s%s", playerid, StrToLower(text));
}
else
{
format(str3, sizeof(str3), "[%d]: %s%s", playerid, text);
}
}

GetPVarString(playerid, "stext", String128, sizeof(String128));
if(!strcmp(str3, String128, true)) return SendClientMessage(playerid, C_RED, "Nie mo?esz napisa? tego samego tekstu po raz drugi!"), 0;
SetPVarString(playerid, "stext", str3);

SendPlayerMessageToAll(playerid,str3);
return 0;
}


Postaw piwo autorowi tego posta
 

 
Tagi: chacie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [DM] Id w chacie Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku