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

Wysłany: 2013-05-17, 16:21


panmajster







Wiek: 42
Na forum: 4787 dni
Posty: 154
Nick w MP: NieWazne

Piwa: 124

Respekt: 50

Witam serdecznie :)

Mam problemik z wyborem skina w wybiera?ce, gdy? jak chce wybra? skina to wy?wietla poprawnie informacja ?e nie nale?? do frakcji, lecz skina i tak wybiera. Jak to zrobi? ?

To kodzik wyboru :

Kod:


public OnPlayerRequestSpawn(playerid)
{
new s=GetPlayerSkin(playerid);
if((s==280||s==281||s==190||s==265||s==266||s==298||s==282||s==283||s==150)&&PlayerInfo[playerid][gFrakcja]!=1)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Police Departament!");
}
if((s==275||s==276||s==233)&&PlayerInfo[playerid][gFrakcja]!=2)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Emergency Departament!");
}
if((s==278||s==279||s==211)&&PlayerInfo[playerid][gFrakcja]!=3)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Fire Departament!");
}
if((s==260||s==50||s==263)&&PlayerInfo[playerid][gFrakcja]!=4)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Road Service!");
}
if((s==46||s==47||s==12)&&PlayerInfo[playerid][gFrakcja]!=5)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Taxi Cab!");
}
if((s==153||s==171||s==11)&&PlayerInfo[playerid][gFrakcja]!=6)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Global AirPlanes!");
}
if((s==294)&&PlayerInfo[playerid][gFrakcja]!=99)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"! BLAD !");
}
return 1;
}


Pozdrawiam :) Polec? piweczka ;)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 16:24


Pr0f3ssi0n4LisT







Wiek: 25
Na forum: 6845 dni
Posty: 120

Piwa: 3653

Respekt: 117,8
Respekt: 117,8

Daj tak !SendClientMessage

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 16:29


panmajster







Wiek: 42
Na forum: 4787 dni
Posty: 154
Nick w MP: NieWazne

Piwa: 124

Respekt: 50

Dalej to samo.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 16:34


Pr0f3ssi0n4LisT







Wiek: 25
Na forum: 6845 dni
Posty: 120

Piwa: 3653

Respekt: 117,8
Respekt: 117,8

Bo to musi byc w OnPlayerRequestClass i gdy gracz naciska Spawn lub rshift wtedy bedzie dzialac

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 16:35


panmajster







Wiek: 42
Na forum: 4787 dni
Posty: 154
Nick w MP: NieWazne

Piwa: 124

Respekt: 50

Kod:


if((classid >= 6) && (classid <= 8))
{
SetPlayerPos(playerid, 2184.8706,1285.7784,42.9332);
SetPlayerFacingAngle(playerid,89.1512);
SetPlayerCameraPos(playerid, 2180.3030,1285.7795,42.7582);
SetPlayerCameraLookAt(playerid, 2180.3030,1285.7795,42.7582);
ApplyAnimation(playerid,"PED","endchat_03",4.1,0,0,0,0,0);
GInfo(playerid,"~n~~n~~n~~b~Police Departament~r~~n~Stan: Los Santos", 3, 10);
}


Jaki? przyk?ad ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 16:43


Pr0f3ssi0n4LisT







Wiek: 25
Na forum: 6845 dni
Posty: 120

Piwa: 3653

Respekt: 117,8
Respekt: 117,8

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 16:46


panmajster







Wiek: 42
Na forum: 4787 dni
Posty: 154
Nick w MP: NieWazne

Piwa: 124

Respekt: 50

Dalej nie dzia?a ;(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 16:55


Pr0f3ssi0n4LisT







Wiek: 25
Na forum: 6845 dni
Posty: 120

Piwa: 3653

Respekt: 117,8
Respekt: 117,8

Wszystko dziala czyli problem masz tu PlayerInfo[playerid][gFrakcja] i dodac musisz ! na poczatku SendClientMessage tak jak pisalem.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 17:00


panmajster







Wiek: 42
Na forum: 4787 dni
Posty: 154
Nick w MP: NieWazne

Piwa: 124

Respekt: 50

w taki spos?b ?

Kod:


if((classid >= 6) && (classid <= 8))
{
SetPlayerPos(playerid, 2184.8706,1285.7784,42.9332);
SetPlayerFacingAngle(playerid,89.1512);
SetPlayerCameraPos(playerid, 2180.3030,1285.7795,42.7582);
SetPlayerCameraLookAt(playerid, 2180.3030,1285.7795,42.7582);
ApplyAnimation(playerid,"PED","endchat_03",4.1,0,0,0,0,0);
GInfo(playerid,"~n~~n~~n~~b~Police Departament~r~~n~Stan: Los Santos", 3, 10);
!SendClientMessage(playerid, KOLOR_CZERWONY,"Do Policji!!");
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 17:02


Pr0f3ssi0n4LisT







Wiek: 25
Na forum: 6845 dni
Posty: 120

Piwa: 3653

Respekt: 117,8
Respekt: 117,8

W pierwszym poscie dodaj ! bo to musi byc w OnPlayerRequestSpawn i sprawdz ta tablice

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 17:04


panmajster







Wiek: 42
Na forum: 4787 dni
Posty: 154
Nick w MP: NieWazne

Piwa: 124

Respekt: 50

W pierwszym po?cie czyli gdzie ?

Kod:


public OnPlayerRequestClass(playerid, classid)
{
if((classid >= 6) && (classid <= 8))
{
SetPlayerPos(playerid, 2184.8706,1285.7784,42.9332);
SetPlayerFacingAngle(playerid,89.1512);
SetPlayerCameraPos(playerid, 2180.3030,1285.7795,42.7582);
SetPlayerCameraLookAt(playerid, 2180.3030,1285.7795,42.7582);
ApplyAnimation(playerid,"PED","endchat_03",4.1,0,0,0,0,0);
GInfo(playerid,"~n~~n~~n~~b~Police Departament~r~~n~Stan: Los Santos", 3, 10);
!SendClientMessage(playerid, KOLOR_CZERWONY,"Do Policji!!");
}
return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 17:19


IgrexolonO







Wiek: 34
Na forum: 6809 dni
Posty: 1386

Piwa: 1062

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

http://wiki.sa-mp.com/wiki/OnPlayerRequestClass

Kod:

public OnPlayerRequestClass(playerid, classid)
{
new s=classid;
if((s==280||s==281||s==190||s==265||s==266||s==298||s==282||s==283||s==150)&&PlayerInfo[playerid][gFrakcja]!=1)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Police Departament!"), 0;
}
if((s==275||s==276||s==233)&&PlayerInfo[playerid][gFrakcja]!=2)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Emergency Departament!"), 0;
}
if((s==278||s==279||s==211)&&PlayerInfo[playerid][gFrakcja]!=3)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Fire Departament!"), 0;
}
if((s==260||s==50||s==263)&&PlayerInfo[playerid][gFrakcja]!=4)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Road Service!"), 0;
}
if((s==46||s==47||s==12)&&PlayerInfo[playerid][gFrakcja]!=5)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Taxi Cab!"), 0;
}
if((s==153||s==171||s==11)&&PlayerInfo[playerid][gFrakcja]!=6)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Global AirPlanes!"), 0;
}
if((s==294)&&PlayerInfo[playerid][gFrakcja]!=99)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"! BLAD !"), 0;
}
return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 17:26


panmajster







Wiek: 42
Na forum: 4787 dni
Posty: 154
Nick w MP: NieWazne

Piwa: 124

Respekt: 50

Ale to nie mo?e by? w "class" to co poda?e?, gdy? musz? skiny wy?wietla? a "class" wygl?da tak :

Kod:


public OnPlayerRequestClass(playerid, classid)
{
if((classid >= 6) && (classid <= 8))
{
SetPlayerPos(playerid, 2184.8706,1285.7784,42.9332);
SetPlayerFacingAngle(playerid,89.1512);
SetPlayerCameraPos(playerid, 2180.3030,1285.7795,42.7582);
SetPlayerCameraLookAt(playerid, 2180.3030,1285.7795,42.7582);
ApplyAnimation(playerid,"PED","endchat_03",4.1,0,0,0,0,0);
GInfo(playerid,"~n~~n~~n~~b~Police Departament~r~~n~Stan: Los Santos", 3, 10);
}
return 1;
}


Bo "class" to wybiera?ka... ;)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 17:51


Pr0f3ssi0n4LisT







Wiek: 25
Na forum: 6845 dni
Posty: 120

Piwa: 3653

Respekt: 117,8
Respekt: 117,8

"panmajster" napisał/a:

Witam serdecznie :)

Mam problemik z wyborem skina w wybiera?ce, gdy? jak chce wybra? skina to wy?wietla poprawnie informacja ?e nie nale?? do frakcji, lecz skina i tak wybiera. Jak to zrobi? ?

To kodzik wyboru :

Kod:


public OnPlayerRequestSpawn(playerid)
{
new s=GetPlayerSkin(playerid);
if((s==280||s==281||s==190||s==265||s==266||s==298||s==282||s==283||s==150)&&PlayerInfo[playerid][gFrakcja]!=1)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Police Departament!");
}
if((s==275||s==276||s==233)&&PlayerInfo[playerid][gFrakcja]!=2)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Emergency Departament!");
}
if((s==278||s==279||s==211)&&PlayerInfo[playerid][gFrakcja]!=3)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Fire Departament!");
}
if((s==260||s==50||s==263)&&PlayerInfo[playerid][gFrakcja]!=4)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Road Service!");
}
if((s==46||s==47||s==12)&&PlayerInfo[playerid][gFrakcja]!=5)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Taxi Cab!");
}
if((s==153||s==171||s==11)&&PlayerInfo[playerid][gFrakcja]!=6)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"Nie nalezysz do Global AirPlanes!");
}
if((s==294)&&PlayerInfo[playerid][gFrakcja]!=99)
{
return SendClientMessage(playerid, KOLOR_CZERWONY,"! BLAD !");
}
return 1;
}


Pozdrawiam :) Polec? piweczka ;)


Tu pozmieniaj na !SendClientMessage i szukaj czemu spawnuje i jaka masz ustawiona frakcje w PlayerInfo[playerid][gFrakcja] bo w tej tablicy musi byc blad

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-05-17, 17:54


IgrexolonO







Wiek: 34
Na forum: 6809 dni
Posty: 1386

Piwa: 1062

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

"panmajster" napisał/a:

Ale to nie mo?e by? w "class" to co poda?e?, gdy? musz? skiny wy?wietla? a "class" wygl?da tak :

Kod:


public OnPlayerRequestClass(playerid, classid)
{
if((classid >= 6) && (classid <= 8))
{
SetPlayerPos(playerid, 2184.8706,1285.7784,42.9332);
SetPlayerFacingAngle(playerid,89.1512);
SetPlayerCameraPos(playerid, 2180.3030,1285.7795,42.7582);
SetPlayerCameraLookAt(playerid, 2180.3030,1285.7795,42.7582);
ApplyAnimation(playerid,"PED","endchat_03",4.1,0,0,0,0,0);
GInfo(playerid,"~n~~n~~n~~b~Police Departament~r~~n~Stan: Los Santos", 3, 10);
}
return 1;
}


Bo "class" to wybiera?ka... ;)


Gdyby? nie zauwa?y? to zmieni?em kilka rzeczy, na tyle, ?eby ca?a funkcja dzia?a?a.

Postaw piwo autorowi tego posta
 

 
Tagi: wybór :: skina
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] Wybór skina 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