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

Wysłany: 2012-05-22, 17:54


kamiloo2







Wiek: 30
Na forum: 5694 dni
Posty: 84

Piwa: 289

Respekt: 50

Mam taki skrypt:
Kod:


if(strcmp(cmdtext,"/zaladuj",true)==0)
{

if(!IsPlayerInAnyVehicle(playerid)){
SendClientMessage(playerid,COLOR_YELLOW,">>Chcesz dostarczyc towar na pieszo?");
return 1;
}
if(zaladowany[playerid] != 0){
SendClientMessage(playerid,COLOR_YELLOW, "[INFO]Ju? jeste? za?adowany!");
return 1;
}


if(UzylRozladuj[playerid]==1){
SendClientMessage(playerid, COLOR_RED, ">>>Niedawno roz?adowa?e? towar! Spr?buj za kilka minut:)<<<<");
return 1;
}
if(!IsPlayerInCheckpoint(playerid) && (playerCheckpoint[playerid] == CP_1 || playerCheckpoint[playerid] == CP_2 || playerCheckpoint[playerid] == CP_3 || CP_4 || CP_5 || CP_6 || CP_7 || CP_8 || CP_9 || CP_10 || CP_11 || CP_12 || CP_13 || CP_14 || CP_15 || CP_16 || CP_17 || CP_18 || CP_19 || CP_20 || CP_21 || CP_22 || CP_23 || CP_24 || CP_25 || CP_26 || CP_27|| CP_28|| CP_29|| CP_30|| CP_31|| CP_32|| CP_33|| CP_34|| CP_35)){
SendClientMessage(playerid, COLOR_RED, "Nie jeste? w wyznaczonym markerze!");

return 1;
}
TogglePlayerControllable(playerid,0);
SetTimerEx("czas2", 30000, 0, "i", 3);
if(IsPlayerInCheckpoint(playerid) && (playerCheckpoint[playerid] == CP_1 || playerCheckpoint[playerid] == CP_2 || playerCheckpoint[playerid] == CP_3 || CP_4 || CP_5 || CP_6 || CP_7 || CP_8 || CP_9 || CP_10 || CP_11 || CP_12 || CP_13 || CP_14 || CP_15 || CP_16 || CP_17 || CP_18 || CP_19 || CP_20 || CP_21 || CP_22 || CP_23 || CP_24 || CP_25 || CP_26 || CP_27|| CP_28|| CP_29|| CP_30|| CP_31|| CP_32|| CP_33|| CP_34|| CP_35)){
ShowPlayerDialog(playerid,987,DIALOG_STYLE_LIST,"Zaladunki","Legalne\nNielegalne lub Przeladowane","Wybierz","Anuluj");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Aby wybra? towar zaznacz go a nastepnie enter lub myszka na lewy przycisk wybierz.");
ustaltowar[playerid] = 35;

}

I jak zrobi? aby komenda "/zaladuj" by?a tylko dla tir?w + naczepy oraz dostawczaki ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-05-22, 19:29


ToxiC.







Wiek: 28
Na forum: 5246 dni
Posty: 3792

Piwa: 8590

Respekt: 1143,8
Respekt: 1143,8

if(strcmp(cmdtext,"/zaladuj",true)==0)
{

if(!GetVehicleModel(vehicleid) == 411) // tam gdzie s? cyfry, to ID wozu w kt?rym mo?na u?y? t? komend?! Zmie? go na swoje, a je?li chcesz doda? wi?cej( jak si? nie myle, to po przecinku , ale to moze nie dzia?a?! )
SendClientMessage(playerid,COLOR_YELLOW,">>Musisz by? w Ci??ar?wce!");
return 1;
}
if(zaladowany[playerid] != 0){
SendClientMessage(playerid,COLOR_YELLOW, "[INFO]Ju? jeste? za?adowany!");
return 1;
}


if(UzylRozladuj[playerid]==1){
SendClientMessage(playerid, COLOR_RED, ">>>Niedawno roz?adowa?e? towar! Spr?buj za kilka minut:)<<<<");
return 1;
}
if(!IsPlayerInCheckpoint(playerid) && (playerCheckpoint[playerid] == CP_1 || playerCheckpoint[playerid] == CP_2 || playerCheckpoint[playerid] == CP_3 || CP_4 || CP_5 || CP_6 || CP_7 || CP_8 || CP_9 || CP_10 || CP_11 || CP_12 || CP_13 || CP_14 || CP_15 || CP_16 || CP_17 || CP_18 || CP_19 || CP_20 || CP_21 || CP_22 || CP_23 || CP_24 || CP_25 || CP_26 || CP_27|| CP_28|| CP_29|| CP_30|| CP_31|| CP_32|| CP_33|| CP_34|| CP_35)){
SendClientMessage(playerid, COLOR_RED, "Nie jeste? w wyznaczonym markerze!");

return 1;
}
TogglePlayerControllable(playerid,0);
SetTimerEx("czas2", 30000, 0, "i", 3);
if(IsPlayerInCheckpoint(playerid) && (playerCheckpoint[playerid] == CP_1 || playerCheckpoint[playerid] == CP_2 || playerCheckpoint[playerid] == CP_3 || CP_4 || CP_5 || CP_6 || CP_7 || CP_8 || CP_9 || CP_10 || CP_11 || CP_12 || CP_13 || CP_14 || CP_15 || CP_16 || CP_17 || CP_18 || CP_19 || CP_20 || CP_21 || CP_22 || CP_23 || CP_24 || CP_25 || CP_26 || CP_27|| CP_28|| CP_29|| CP_30|| CP_31|| CP_32|| CP_33|| CP_34|| CP_35)){
ShowPlayerDialog(playerid,987,DIALOG_STYLE_LIST,"Zaladunki","Legalne\nNielegalne lub Przeladowane","Wybierz","Anuluj");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Aby wybra? towar zaznacz go a nastepnie enter lub myszka na lewy przycisk wybierz.");
ustaltowar[playerid] = 35;

}

Postaw piwo autorowi tego posta
 

 
Tagi: dana :: komenda :: tylko :: dla :: danych :: aut
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] dana komenda tylko dla danych aut 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