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

Wysłany: 2014-02-27, 10:10


KaNdY







Wiek: 29
Na forum: 4487 dni
Posty: 53
Nick w MP: KaNdY

Piwa: 1

Respekt: 56,5

Witam po raz kolejny! Ot?? mam problem, poniewa? zrobi?em 'Team Drifterski' na wz?r ViP'a. Do ViP'a dodawa? administrator komend?, wystarczy, ?e doda?em:
Kod:


if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{009933}[Serv4Drift]{FFFFFF} Nie jeste? Administratorem.");


Natomiast chc? to przerobi?, aby gracz o danym nicku (za???my Joahim) m?g? dodawa? do Teamu. On i tylko On. Niestety nie wiem jak to zrobi? i tu k?aniam si? w wasz? stron?, czy pomo?ecie?

Kod komendy:
Kod:


CMD:d_dt(playerid, params[])
{
new leader;
new strcatx[256];
new name[31];
leader = strval(params);
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{009933}[Serv4Drift]{FFFFFF} Nie jeste? Administratorem.");
if(isnull(params)) return SendClientMessage(playerid, -1, "{009933}[Serv4Drift]{FFFFFF} Komenda na dodanie do 'Drift Teamu' /d_dt [ID]");
if(!IsPlayerConnected(leader)) return SendClientMessage(playerid, -1, "{009933}[Serv4Drift]{FFFFFF} Niema gracza o podanym ID.");
ViP2[leader] = 1;
GetPlayerName(leader, name, 31);
format(strcatx, 256, "{009933}[Serv4Drift]{FFFFFF} Doda?e? %s do Drift Teamu.",name);
SendClientMessage(playerid, -1, strcatx);
SendClientMessage(leader, -1, "{009933}==================================");
SendClientMessage(leader, -1, "{009933}[Serv4Drift]{FFFFFF} Zosta?e? dodany do Drift Teamu.");
SendClientMessage(leader, -1, "{009933}==================================");
return 1;
}


Za pomoc:
:piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-02-27, 10:37


Vise







Wiek: 37
Na forum: 4480 dni
Posty: 2
Nick w MP: Vise

Piwa: 64

Respekt: 50

Kod:

GetPlayerName(playerid, PlayerName(playerid), MAX_PLAYER_NAME);

if(strcmp(PlayerName(playerid), "NICK GRACZA", false) != 0 && strcmp(PlayerName(playerid), "NICK GRACZA", false) != 0)

return SendClientMessage(playerid, -1, "Nie mozesz uzyc tej komendy");


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-02-27, 14:03


IgrexolonO







Wiek: 34
Na forum: 6809 dni
Posty: 1386

Piwa: 1062

Respekt: 651,8
Respekt: 651,8Respekt: 651,8

"Vise" napisał/a:

Kod:

GetPlayerName(playerid, PlayerName(playerid), MAX_PLAYER_NAME);

if(strcmp(PlayerName(playerid), "NICK GRACZA", false) != 0 && strcmp(PlayerName(playerid), "NICK GRACZA", false) != 0)

return SendClientMessage(playerid, -1, "Nie mozesz uzyc tej komendy");


O URWA CO TO JEST XDDDDd

Jak nie masz, to dodaj:

Kod:

stock PlayerName(pid)
{
new n[24];
GetPlayerName(pid, n, 24);
return n;
}


Kod:

if(strcmp(PlayerName(playerid), "JUDASZ", false) != 0) return SendClientMessage(playerid, -1, "Sorry, nie jeste? Judasz!!1");


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-02-27, 15:24


KaNdY







Wiek: 29
Na forum: 4487 dni
Posty: 53
Nick w MP: KaNdY

Piwa: 1

Respekt: 56,5

Kod:

C
:\Users\Szymon\Desktop\Server\gamemodes\Drift.pwn(1029) : error 035: argument type mismatch (argument 1)
C:\Users\Szymon\Desktop\Server\gamemodes\Drift.pwn(1048) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

Kod:


if(strcmp(PlayerName(playerid), "Amarena", false) != 0) return SendClientMessage(playerid, -1, "{009933}[Serv4Drift]{FFFFFF} Komenda niedost?pna!");
1029:


x2 razy to samo, poniewa? do 2 komend.

Postaw piwo autorowi tego posta
 

 
Tagi: team
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [INNE] Team 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