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

Wysłany: 2014-05-08, 16:11


Cracku







Wiek: 35
Na forum: 5407 dni
Posty: 26



Respekt: 50

Ostrzeżeń: 20%
Siemka mam taki problem zrobi?em komend?. Dzia?a ona normalnie jak wpisuj? /usunblokade a jak wpisz? /usunblokade (np: 1) to ju? nie.
Oto kod:
Kod:

if(!strcmp(cmdtext, "/usunblokade"))
{
new string[256];
new idx;
new obj2id = strval(strtok(cmdtext, idx));
if(!obj2id)
{
SendClientMessage(playerid, COLOR_GREY, "/usunblokade [ID]");
return 1;
}
if(obj2id>vehi)
{
SendClientMessage(playerid, COLOR_GREY, "/usunblokade [ID]");
return 1;
}
DestroyObject(vehic[obj2id]);
format(string, sizeof(string), "Usuno?e? blokade o ID: %d", obj2id);
SendClientMessage(playerid,COLOR_GREEN, string);
return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-08, 16:28


Lukasbank







Wiek: 30
Na forum: 5329 dni
Posty: 249
Nick w MP: [USD]LuXoR[X]

Piwa: 404

Respekt: 136,5
Respekt: 136,5

Kod:



if(!strcmp(cmdtext, "/usunblokade"))
{
new string[256];
new idx;
new obj2id = strval(strtok(cmdtext, idx));
if(!obj2id)
{
SendClientMessage(playerid, COLOR_GREY, "/usunblokade [ID]");
return 1;
}
else if(obj2id>vehi)
{
SendClientMessage(playerid, COLOR_GREY, "/usunblokade [ID]");
return 1;
}
DestroyObject(vehic[obj2id]);
format(string, sizeof(string), "Usuno?e? blokade o ID: %d", obj2id);
SendClientMessage(playerid,COLOR_GREEN, string);
return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-08, 21:30


Cracku







Wiek: 35
Na forum: 5407 dni
Posty: 26



Respekt: 50

Ostrzeżeń: 20%
Nadal nie dziala, dam ci dwie komendy mo?e:

Kod:

if(!strcmp(cmdtext, "/blokada"))
{
vehi++;
new string[256];
new Float:posx;
new Float:posy;
new Float:posz;
GetPlayerPos(playerid, posx, posy, posz);
if(IsPlayerInAnyVehicle(playerid))
{
vehic[vehi] = CreateObject(3578, posx, posy, posz, 0, 0, 90, 250);
SetPlayerPos(playerid, posx, posy, posz + 1);
format(string, sizeof(string), "Stworzy?e? blokade o ID: %d", vehi);
SendClientMessage(playerid,COLOR_GREEN, string);
}
else
{
vehic[vehi] = CreateObject(3578, posx, posy, posz, 0, 0, 0, 250);
SetPlayerPos(playerid, posx, posy, posz + 1);
format(string, sizeof(string), "Stworzy?e? blokade o ID: %d", vehi);
SendClientMessage(playerid,COLOR_GREEN, string);
}
return 1;
}
if(!strcmp(cmdtext, "/usunblokade"))
{
new string[256];
new idx;
new obj2id = strval(strtok(cmdtext, idx));
if(!obj2id)
{
SendClientMessage(playerid, COLOR_GREY, "/usunblokade [ID]");
return 1;
}
else if(obj2id>vehi)
{
SendClientMessage(playerid, COLOR_GREY, "/usunblokade [ID]");
return 1;
}
DestroyObject(vehic[obj2id]);
format(string, sizeof(string), "Usuno?e? blokade o ID: %d", obj2id);
SendClientMessage(playerid,COLOR_GREEN, string);
return 1;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-05-09, 19:49


IgrexolonO







Wiek: 34
Na forum: 6809 dni
Posty: 1386

Piwa: 1062

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

Kod:

if(!strcmp(cmdtext, "/blokada"))
{
vehi++;
new string[160], Float:_pos[3];
GetPlayerPos(playerid, _pos[0], _pos[1], _pos[2]);
if(IsPlayerInAnyVehicle(playerid))
{
vehic[vehi] = CreateObject(3578, _pos[0], _pos[1], _pos[2], 0.0, 0.0, 90.0, 250);
SetPlayerPos(playerid, _pos[0], _pos[1], _pos[2] + 1);
format(string, sizeof(string), "Stworzy?e? blokad? o ID: %d", vehi);
SendClientMessage(playerid, COLOR_GREEN, string);
}
else
{
vehic[vehi] = CreateObject(3578, _pos[0], _pos[1], _pos[2], 0.0, 0.0, 0.0, 250);
SetPlayerPos(playerid, _pos[0], _pos[1], _pos[2] + 1);
format(string, sizeof(string), "Stworzy?e? blokade o ID: %d", vehi);
SendClientMessage(playerid,COLOR_GREEN, string);
}
return true;
}
if(!strcmp(cmdtext, "/usunblokade"))
{
new string[160], obj2id = strval(cmdtext[13]);
if(!obj2id) return SendClientMessage(playerid, COLOR_GREY, "/usunblokade [ID]");
if(obj2id>vehi) return SendClientMessage(playerid, COLOR_GREY, "/usunblokade [ID]");
if(!IsValidObject(vehic[obj2id])) return SendClientMessage(playerid, COLOR_GREY, "Wybrany obiekt nie istnieje.");
DestroyObject(vehic[obj2id]);
format(string, sizeof(string), "Usun??e? blokade o ID: %d", obj2id);
SendClientMessage(playerid,COLOR_GREEN, string);
return true;
}


Postaw piwo autorowi tego posta
 

 
Tagi: komenda :: nie :: działa
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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