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

Wysłany: 2014-12-21, 19:52


Cycu_kiepski







Wiek: 28
Na forum: 5234 dni
Posty: 40
Nick w MP: Pawcio66

Piwa: 1

Respekt: 50

Witam mam problem z fotoradarami stawiam normalnie na luzie wszystko paca ?apie ale nie stawia obiektu fotoradaru ;/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-21, 19:55


Sillence







Wiek: 26
Na forum: 5157 dni
Posty: 1514
Nick w MP: Sillence

Piwa: 1517

Respekt: 416,3
Respekt: 416,3

Cycu_kiepski, Poka? kod, w kt?rym tworzysz fotoradar.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-21, 20:05


Cycu_kiepski







Wiek: 28
Na forum: 5234 dni
Posty: 40
Nick w MP: Pawcio66

Piwa: 1

Respekt: 50

Kod:

#define FOTORADARY "Fotoradary/%s.ini"
enum _camera
{Float:_x,Float:_y,Float:_z,Float:_rot,_range,_limit,_fine,_usemph,_objectid,bool:_active,bool:_activelabel,_labeltxt[128],Text3D:_label}
new SpeedCameras[CAMERA_LIMIT][_camera],loaded_cameras = 0,Text:flash;
stock Text3D:AttachLabelToCamera(cameraid,text[])
{
new position,buffer[128];format(buffer,sizeof buffer,"%s",text);
for(new i = 0;strfind(buffer,"\\n",true) != -1;i++)
{
position = strfind(buffer,"\\n",true);
strdel(buffer,position,position +2);
strins(buffer,"\r\n",position,sizeof(buffer));
}
return Create3DTextLabel(buffer,CAMERA_LABEL_COLOR,SpeedCameras[cameraid][_x],SpeedCameras[cameraid][_y],SpeedCameras[cameraid][_z] +7,100,0,0);
}
stock UpdateCameraLabel(Text3D:labelid,text[])
{
new position,buffer[128];format(buffer,sizeof buffer,"%s",text);
for(new i = 0;strfind(buffer,"\\n",true) != -1;i++)
{
position = strfind(buffer,"\\n",true);
strdel(buffer,position,position +2);
strins(buffer,"\r\n",position,sizeof(buffer));
}
return Update3DTextLabelText(labelid,CAMERA_LABEL_COLOR,buffer);
}
//===================================================================================================
// Inicjowanie
//===================================================================================================
public OnFilterScriptInit()
{
SetTimer("UpdateCameras",CAMERA_UPDATE_INTERVAL,true);
flash = TextDrawCreate(-20.000000,2.000000,"|");
TextDrawUseBox(flash,1);
TextDrawBoxColor(flash,0xffffff66);
TextDrawTextSize(flash,660.000000,22.000000);
TextDrawAlignment(flash,0);
TextDrawBackgroundColor(flash,0x000000ff);
TextDrawFont(flash,3);
TextDrawLetterSize(flash,1.000000,52.200000);
TextDrawColor(flash,0xffffffff);
TextDrawSetOutline(flash,1);
TextDrawSetProportional(flash,1);
TextDrawSetShadow(flash,1);
LoadCameras();
return 1;
}
public OnFilterScriptExit()
{
RemoveCameras();
return 1;
}
//===================================================================================================
// Komendy
//===================================================================================================
CMD:fotoradar(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
ShowPlayerDialog(playerid,DIALOG_MAIN,DIALOG_STYLE_LIST,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Menu","{37FF00}Stworz fotoradar\n\nPobierz najbli?sze ID fotoradaru\nEdytuj najbli?szy fotoradar\n{FF1400}Usu? najbli?szy fotoradar\n{FF1400}Usu? wszystkie fotoradary","Ok","Wyjdz");
return 1;
}

//===================================================================================================
// Funkcje
//===================================================================================================
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(!response) {
DeletePVar(playerid,"range");
DeletePVar(playerid,"limit");
DeletePVar(playerid,"fine");
DeletePVar(playerid,"selected");
return 1;
}
switch(dialogid)
{
//======================================================
// Menu
//======================================================
case DIALOG_MAIN:
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid,DIALOG_RANGE,DIALOG_STYLE_INPUT,"Wstaw zasi?g", "Prosz? wstawi? zasi?g (zalecane: 20-30)","Ok","Cancel");
case 1:
{
new cam = GetClosestCamera(playerid);
if(cam == -1) return SendClientMessage(playerid,KOLOR_CZERWONY,"( ! ) {FFFFFF}Nie ma ?adnego fotoradaru w pobli?u!");
SendClientMessageEx(playerid,KOLOR_NIEBIESKI,"sis","ID najbli?szego fotoradaru to: ",cam,".");
}
case 2:
{
new cam = GetClosestCamera(playerid);
if(cam == -1) return SendClientMessage(playerid,KOLOR_CZERWONY,"( ! ) {FFFFFF}Nie ma ?adnego fotoradaru w pobli?u!");
SetPVarInt(playerid,"selected",cam);
ShowPlayerDialog(playerid,DIALOG_EDIT,DIALOG_STYLE_LIST,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja","Zmiana k?ta\nZmie? zakres\nZmiana ograniczenia pr?dko?ci\nZmiana porz?dku\nPrze??cz tryb mph\nDodaj/Usu?/Edytuj tekst etykiety\n{FF1400}Usu? fotoradar","Ok","Wyjdz");
}
case 3:
{
new cam = GetClosestCamera(playerid);
if(cam == -1) return SendClientMessage(playerid,KOLOR_CZERWONY,"( ! ) {FFFFFF}Nie ma ?adnego fotoradaru w pobli?u.");
DestroySpeedCam(cam);
SendClientMessage(playerid,KOLOR_ZIELONY,"( ! ) {FFFFFF}Usuni?to fotoradar.");
DeletePVar(playerid,"selected");
}
case 4:
{
for(new i = 0;i<loaded_cameras +1;i++)
{
if(SpeedCameras[i][_active] == true)
{
DestroySpeedCam(i);
}
}
SendClientMessage(playerid,KOLOR_ZIELONY,"( ! ) {FFFFFF}Wszystkie fotoradary zosta?y usuni?te.");
}
}
}
//======================================================
// Making a speedcam
//======================================================
case DIALOG_RANGE:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_RANGE,DIALOG_STYLE_INPUT,"Zasi?g","Prosz? wpisa? zasi?g (zalecane: 20-30)","Ok","Wyjdz");
SetPVarInt(playerid,"range",strval(inputtext));
ShowPlayerDialog(playerid,DIALOG_LIMIT,DIALOG_STYLE_INPUT,"Limit pr?dko?ci","Prosze wpisa? limit pr?dko?ci.","Ok","Wyjdz");
}
case DIALOG_LIMIT:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_LIMIT,DIALOG_STYLE_INPUT,"Limit pr?dko?ci","Prosze wpisa? limit pr?dko?ci.","Ok","Wyjdz");
SetPVarInt(playerid,"limit",strval(inputtext));
ShowPlayerDialog(playerid,DIALOG_FINE,DIALOG_STYLE_INPUT,"Grzywny","Prosze wpisa? ilo?? kary.","Ok","Wyjdz");
}
case DIALOG_FINE:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_FINE,DIALOG_STYLE_INPUT,"Grzywny","Prosze wpisa? ilo?? kary.","Ok","Wyjdz");
SetPVarInt(playerid,"fine",strval(inputtext));
new Float:x,Float:y,Float:z,Float:angle;
GetPlayerPos(playerid,x,y,z);GetPlayerFacingAngle(playerid,angle);
angle = angle + 180;if(angle > 360){angle = angle - 360;}
new id = CreateSpeedCam(x,y,z -3,angle,GetPVarInt(playerid,"range"),GetPVarInt(playerid,"limit"),GetPVarInt(playerid,"fine"),CAMERA_USEMPH);
SetPlayerPos(playerid,x,y+2,z);
DeletePVar(playerid,"range");
DeletePVar(playerid,"limit");
DeletePVar(playerid,"fine");
SetPVarInt(playerid,"selected",id);
ShowPlayerDialog(playerid,DIALOG_EDIT,DIALOG_STYLE_LIST,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja","Zmiana k?ta\nZmie? zakres\nZmiana ograniczenia pr?dko?ci\nZmiana porz?dku\nPrze??cz tryb mph\nDodaj/Usu?/Edytuj tekst etykiety\n{FF1400}Usu? fotoradar","Ok","Wyjdz");
}

//======================================================
// Edit menu
//======================================================
case DIALOG_EDIT:
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid,DIALOG_EANGLE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - K?t","Wpisz nowy k?t","Ok","Wyjdz");
case 1: ShowPlayerDialog(playerid,DIALOG_ERANGE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Zasi?g","Wpisz nowy zasi?g","Ok","Wyjdz");
case 2: ShowPlayerDialog(playerid,DIALOG_ELIMIT,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Limit","Wpisz nowy limit predko?ci","Ok","Wyjdz");
case 3: ShowPlayerDialog(playerid,DIALOG_EFINE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Kary","Wpisz now? kare","Ok","Wyjdz");
case 4: ShowPlayerDialog(playerid,DIALOG_ETYPE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - MP/h | KM/h ","Wpisz 1 aby u?ywa? mp/h\nWpisz 0 aby u?ywa? km/h","Ok","Wyjdz");
case 5: ShowPlayerDialog(playerid,DIALOG_LABEL,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Wiadomo??"," Prosz? wpisa? tekst, kt?ry ma sie pokaza? po przekroczeniu pr?dko?ci\nlub pozostaw puste, aby usun?? istniej?ca wiadomo??! ","Ok","Wyjdz");
case 6:
{
DestroySpeedCam(GetPVarInt(playerid,"selected"));
SendClientMessage(playerid,KOLOR_ZIELONY,"( ! ) {FFFFFF}Usuni?to fotoradar.");
DeletePVar(playerid,"selected");
}
}
}

//======================================================
// Editing a speedcam
//======================================================
case DIALOG_EANGLE:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_EANGLE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - K?t","Wpisz nowy k?t","Ok","Wyjdz");
new id = GetPVarInt(playerid,"selected");
new rot = strval(inputtext);
rot = rot + 180;
if (rot > 360)
{
rot = rot - 360;
}
SpeedCameras[id][_rot] = rot;
SetObjectRot(SpeedCameras[id][_objectid],0,0,rot);
SaveCamera(id);
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sisis","K?t fotoradaru ID: ",id," zosta? pomy?lnie zaktualizowany: ",strval(inputtext),".");
}
case DIALOG_ERANGE:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_ERANGE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Zasi?g","Wpisz nowy zasi?g","Ok","Wyjdz");
new id = GetPVarInt(playerid,"selected");
SpeedCameras[id][_range] = strval(inputtext);
SaveCamera(id);
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sisis","Zasi?g fotoradaru ID: ",id," zosta? pomy?lnie zaktualizowany: ",strval(inputtext),".");
}
case DIALOG_ELIMIT:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_ELIMIT,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Limit","Wpisz nowy limit predko?ci","Ok","Wyjdz");
new id = GetPVarInt(playerid,"selected");
SpeedCameras[id][_limit] = strval(inputtext);
SaveCamera(id);
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sisis","Limit pr?dko?ci fotoradaru ID:",id," zosta? pomy?lnie zaktualizowany: ",strval(inputtext),".");
}
case DIALOG_EFINE:
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_EFINE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Kary","Wpisz now? kare","Ok","Wyjdz");
new id = GetPVarInt(playerid,"selected");
SpeedCameras[id][_fine] = strval(inputtext);
SaveCamera(id);
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sisis","Kara fotoradaru ID: ",GetPVarInt(playerid,"selected")," zosta?a pomy?lnie zaktualizowana: ",strval(inputtext),".");
}
case DIALOG_ETYPE:
{
if(!strlen(inputtext) || strval(inputtext) != 0 && strval(inputtext) != 1) return ShowPlayerDialog(playerid,DIALOG_ETYPE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - MP/h | KM/h ","Wpisz 1 aby u?ywa? mp/h\nWpisz 0 aby u?ywa? km/h","Ok","Wyjdz");
new id = GetPVarInt(playerid,"selected");
SpeedCameras[id][_usemph] = strval(inputtext);
if(strval(inputtext) == 1)
{
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sis","Fotoradar ID: ",GetPVarInt(playerid,"selected")," mierzy pr?dko?? w mph.");
} else {
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sis","Fotoradar ID: ",GetPVarInt(playerid,"selected")," mierzy pr?dko?? w kmh.");
}
}
case DIALOG_LABEL:
{
new id = GetPVarInt(playerid,"selected");
if(!strlen(inputtext))
{
if(SpeedCameras[id][_activelabel] == true)
{
Delete3DTextLabel(SpeedCameras[id][_label]);
SpeedCameras[id][_activelabel] = false;
SpeedCameras[id][_labeltxt] = 0;
}
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sis","Wiadomo?? fotoradaru ID: ",GetPVarInt(playerid,"selected")," pomy?lnie usuni?ta.");
} else {
if(SpeedCameras[id][_activelabel] == true)
{
format(SpeedCameras[id][_labeltxt],128,"%s",inputtext);
UpdateCameraLabel(SpeedCameras[id][_label],inputtext);
} else {
SpeedCameras[id][_activelabel] = true;
format(SpeedCameras[id][_labeltxt],128,"%s",inputtext);
SpeedCameras[id][_label] = AttachLabelToCamera(id,inputtext);
}
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sisss","Wiadomo?? fotoradaru ID: ",GetPVarInt(playerid,"selected")," zosta?a pomy?lnie zaktualizowana: ",inputtext,".");
}
SaveCamera(id);
}
}
return 0;
}
//===================================================================================================
// Functions
//===================================================================================================
stock LoadCameras()
{
new file[64];
for(new i = 0;i<CAMERA_LIMIT;i++)
{
format(file,sizeof file,FOTORADARY,i);
if(fexist(file))
{
INI_ParseFile(file,"LoadCam",.bExtra = true,.extra = i);
#if STREAMER_ENABLED == true
SpeedCameras[i][_objectid] = STREAMER_ADD(18880,SpeedCameras[i][_x],SpeedCameras[i][_y],SpeedCameras[i][_z],0,0,SpeedCameras[i][_rot]);

}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-21, 23:28


Colin_Carleone







Wiek: 30
Na forum: 5725 dni
Posty: 373

Piwa: 4800

Respekt: 83,3

Cycu_kiepski, mo?esz sobie pobra? kodzik z tego link :) Z tego co widz? to jest ten sam skrypt, tyle ?e ty masz po polsku.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-21, 23:46


Cycu_kiepski







Wiek: 28
Na forum: 5234 dni
Posty: 40
Nick w MP: Pawcio66

Piwa: 1

Respekt: 50

To jest to samo ;/ Teraz mam problem z nimi bo wszystko niby ?niga a wgl nie lapie ;/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-22, 00:49


Colin_Carleone







Wiek: 30
Na forum: 5725 dni
Posty: 373

Piwa: 4800

Respekt: 83,3

Cycu_kiepski, a mo?e brak jakiego? pluginu ? Lub wersja sa:mp'a nie kompatybilna z danym skryptem ? Pobierz inn? wersj? sampa oraz pliki serwerowe do niego, wlacz na domowce i sprobuj odpalic ten skrypt i wtedy zobacz czy bedzie poprawnie dzialal.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-22, 01:11


Cycu_kiepski







Wiek: 28
Na forum: 5234 dni
Posty: 40
Nick w MP: Pawcio66

Piwa: 1

Respekt: 50

Znaczy on og?lnie dzia?? fotoradar sie robi itp ale nie ?apie powy?ej 70 km/h

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-22, 01:30


Colin_Carleone







Wiek: 30
Na forum: 5725 dni
Posty: 373

Piwa: 4800

Respekt: 83,3

Cycu_kiepski, czyli je?li gracz jedzie powy?ej 70 km/h to fotoradar go nie ?apie tak ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-22, 01:35


Cycu_kiepski







Wiek: 28
Na forum: 5234 dni
Posty: 40
Nick w MP: Pawcio66

Piwa: 1

Respekt: 50

np ustawiam fotoradar max predkosc 70 km to jak jedzie np 100 to go z?apie ALE jak ustawiam max 110 to jak sie jedzie nawet 190 km/h to nie cyka

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-22, 02:11


Colin_Carleone







Wiek: 30
Na forum: 5725 dni
Posty: 373

Piwa: 4800

Respekt: 83,3

Cycu_kiepski,



#define FOTORADARY "Fotoradary/%s.ini" 
enum _camera 
{Float:_x,Float:_y,Float:_z,Float:_rot,_range,_limit,_fine,_usemph,_objectid,bool:_active,bool:_activelabel,_labeltxt[128],Text3D:_label}
new SpeedCameras[CAMERA_LIMIT][_camera],loaded_cameras 0,Text:flashstock Text3D:AttachLabelToCamera(cameraid,text[]) 
{ 
new position,buffer[128];format(buffer,sizeof buffer,"%s",text); 
for(new 0;strfind(buffer,"\n",true) != -1;i++) 
{ 
position strfind(buffer,"\n",true); 
strdel(buffer,position,position +2); 
strins(buffer,"\r\n",position,sizeof(buffer)); 
} 
return Create3DTextLabel(buffer,CAMERA_LABEL_COLOR,SpeedCameras[cameraid][_x],SpeedCameras[cameraid][_y],SpeedCameras[cameraid][_z] +7,100,0,0); 
} 
stock UpdateCameraLabel(Text3D:labelid,text[]) 
{ 
new position,buffer[128];format(buffer,sizeof buffer,"%s",text); 
for(new 0;strfind(buffer,"\n",true) != -1;i++) 
{ 
position strfind(buffer,"\n",true); 
strdel(buffer,position,position +2); 
strins(buffer,"\r\n",position,sizeof(buffer)); 
} 
return    Update3DTextLabelText(labelid,CAMERA_LABEL_COLOR,buffer); 
} 
//=================================================================================================== 
// Inicjowanie 
//=================================================================================================== 
public OnFilterScriptInit() 
{ 
SetTimer("UpdateCameras",CAMERA_UPDATE_INTERVAL,true); 
flash TextDrawCreate(-20.000000,2.000000,"|"); 
TextDrawUseBox(flash,1); 
TextDrawBoxColor(flash,0xffffff66); 
TextDrawTextSize(flash,660.000000,22.000000); 
TextDrawAlignment(flash,0); 
TextDrawBackgroundColor(flash,0x000000ff); 
TextDrawFont(flash,3); 
TextDrawLetterSize(flash,1.000000,52.200000); 
TextDrawColor(flash,0xffffffff); 
TextDrawSetOutline(flash,1); 
TextDrawSetProportional(flash,1); 
TextDrawSetShadow(flash,1); 
LoadCameras(); 
return 1; 
} 
public OnFilterScriptExit() 
{ 
RemoveCameras(); 
return 1; 
} 
//=================================================================================================== 
// Komendy 
//=================================================================================================== 
CMD:fotoradar(playerid,params[]) 
{ 
if(!IsPlayerAdmin(playerid)) return 0ShowPlayerDialog(playerid,DIALOG_MAIN,DIALOG_STYLE_LIST,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Menu","{37FF00}Stworz fotoradar\n\nPobierz najbli?sze ID fotoradaru\nEdytuj najbli?szy fotoradar\n{FF1400}Usu? najbli?szy fotoradar\n{FF1400}Usu? wszystkie fotoradary","Ok","Wyjdz"); 
return 1; 
} 

//=================================================================================================== 
// Funkcje 
//=================================================================================================== 
public OnDialogResponse(playeriddialogidresponselistiteminputtext[]) 
{ 
if(!response) { 
DeletePVar(playerid,"range"); 
DeletePVar(playerid,"limit"); 
DeletePVar(playerid,"fine"); 
DeletePVar(playerid,"selected"); 
return 1; 
} 
switch(dialogid) 
{ 
//====================================================== 
// Menu 
//====================================================== 
case DIALOG_MAIN: 
{ 
switch(listitem) 
{ 
case 0ShowPlayerDialog(playerid,DIALOG_RANGE,DIALOG_STYLE_INPUT,"Wstaw zasi?g""Prosz? wstawi? zasi?g (zalecane: 20-30)","Ok","Cancel"); 
case 1: 
{ 
new cam GetClosestCamera(playerid); 
if(cam == -1) return SendClientMessage(playerid,KOLOR_CZERWONY,"( ! ) {FFFFFF}Nie ma ?adnego fotoradaru w pobli?u!"); 
SendClientMessageEx(playerid,KOLOR_NIEBIESKI,"sis","ID najbli?szego fotoradaru to: ",cam,"."); 
} 
case 2: 
{ 
new cam GetClosestCamera(playerid); 
if(cam == -1) return SendClientMessage(playerid,KOLOR_CZERWONY,"( ! ) {FFFFFF}Nie ma ?adnego fotoradaru w pobli?u!"); 
SetPVarInt(playerid,"selected",cam); 
ShowPlayerDialog(playerid,DIALOG_EDIT,DIALOG_STYLE_LIST,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja","Zmiana k?ta\nZmie? zakres\nZmiana ograniczenia pr?dko?ci\nZmiana porz?dku\nPrze??cz tryb mph\nDodaj/Usu?/Edytuj tekst etykiety\n{FF1400}Usu? fotoradar","Ok","Wyjdz"); 
} 
case 3: 
{ 
new cam GetClosestCamera(playerid); 
if(cam == -1) return SendClientMessage(playerid,KOLOR_CZERWONY,"( ! ) {FFFFFF}Nie ma ?adnego fotoradaru w pobli?u."); 
DestroySpeedCam(cam); 
SendClientMessage(playerid,KOLOR_ZIELONY,"( ! ) {FFFFFF}Usuni?to fotoradar."); 
DeletePVar(playerid,"selected"); 
} 
case 4: 
{ 
for(new 0;i<loaded_cameras +1;i++) 
{ 
if(SpeedCameras[i][_active] == true) 
{ 
DestroySpeedCam(i); 
} 
} 
SendClientMessage(playerid,KOLOR_ZIELONY,"( ! ) {FFFFFF}Wszystkie fotoradary zosta?y usuni?te."); 
} 
} 
} 
//====================================================== 
// Making a speedcam 
//====================================================== 
case DIALOG_RANGE: 
{ 
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_RANGE,DIALOG_STYLE_INPUT,"Zasi?g","Prosz? wpisa? zasi?g (zalecane: 20-30)","Ok","Wyjdz"); 
SetPVarInt(playerid,"range",strval(inputtext)); 
ShowPlayerDialog(playerid,DIALOG_LIMIT,DIALOG_STYLE_INPUT,"Limit pr?dko?ci","Prosze wpisa? limit pr?dko?ci.","Ok","Wyjdz"); 
} 
case DIALOG_LIMIT: 
{ 
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_LIMIT,DIALOG_STYLE_INPUT,"Limit pr?dko?ci","Prosze wpisa? limit pr?dko?ci.","Ok","Wyjdz"); 
SetPVarInt(playerid,"limit",strval(inputtext)); 
ShowPlayerDialog(playerid,DIALOG_FINE,DIALOG_STYLE_INPUT,"Grzywny","Prosze wpisa? ilo?? kary.","Ok","Wyjdz"); 
} 
case DIALOG_FINE: 
{ 
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_FINE,DIALOG_STYLE_INPUT,"Grzywny","Prosze wpisa? ilo?? kary.","Ok","Wyjdz"); 
SetPVarInt(playerid,"fine",strval(inputtext)); 
new Float:x,Float:y,Float:z,Float:angleGetPlayerPos(playerid,x,y,z);GetPlayerFacingAngle(playerid,angle); 
angle angle 360;if(angle 360){angle angle 360;} 
new id CreateSpeedCam(x,y,-3,angle,GetPVarInt(playerid,"range"),GetPVarInt(playerid,"limit"),GetPVarInt(playerid,"fine"),CAMERA_USEMPH); 
SetPlayerPos(playerid,x,y+2,z); 
DeletePVar(playerid,"range"); 
DeletePVar(playerid,"limit"); 
DeletePVar(playerid,"fine"); 
SetPVarInt(playerid,"selected",id); 
ShowPlayerDialog(playerid,DIALOG_EDIT,DIALOG_STYLE_LIST,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja","Zmiana k?ta\nZmie? zakres\nZmiana ograniczenia pr?dko?ci\nZmiana porz?dku\nPrze??cz tryb mph\nDodaj/Usu?/Edytuj tekst etykiety\n{FF1400}Usu? fotoradar","Ok","Wyjdz"); 
} 

//====================================================== 
// Edit menu 
//====================================================== 
case DIALOG_EDIT: 
{ 
switch(listitem) 
{ 
case 0ShowPlayerDialog(playerid,DIALOG_EANGLE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - K?t","Wpisz nowy k?t","Ok","Wyjdz"); 
case 1ShowPlayerDialog(playerid,DIALOG_ERANGE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Zasi?g","Wpisz nowy zasi?g","Ok","Wyjdz"); 
case 2ShowPlayerDialog(playerid,DIALOG_ELIMIT,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Limit","Wpisz nowy limit predko?ci","Ok","Wyjdz"); 
case 3ShowPlayerDialog(playerid,DIALOG_EFINE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Kary","Wpisz now? kare","Ok","Wyjdz"); 
case 4ShowPlayerDialog(playerid,DIALOG_ETYPE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - MP/h | KM/h ","Wpisz 1 aby u?ywa? mp/h\nWpisz 0 aby u?ywa? km/h","Ok","Wyjdz"); 
case 5ShowPlayerDialog(playerid,DIALOG_LABEL,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Wiadomo??"," Prosz? wpisa? tekst, kt?ry ma sie pokaza? po przekroczeniu pr?dko?ci\nlub pozostaw puste, aby usun?? istniej?ca wiadomo??! ","Ok","Wyjdz"); 
case 6: 
{ 
DestroySpeedCam(GetPVarInt(playerid,"selected")); 
SendClientMessage(playerid,KOLOR_ZIELONY,"( ! ) {FFFFFF}Usuni?to fotoradar."); 
DeletePVar(playerid,"selected"); 
} 
} 
} 

//====================================================== 
// Editing a speedcam 
//====================================================== 
case DIALOG_EANGLE: 
{ 
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_EANGLE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - K?t","Wpisz nowy k?t","Ok","Wyjdz"); 
new id GetPVarInt(playerid,"selected"); 
new rot strval(inputtext); 
rot rot 180; 
if (rot 360) 
{ 
rot rot 360; 
} 
SpeedCameras[id][_rot] = rotSetObjectRot(SpeedCameras[id][_objectid],0,0,rot); 
SaveCamera(id); 
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sisis","K?t fotoradaru ID: ",id," zosta? pomy?lnie zaktualizowany: ",strval(inputtext),"."); 
} 
case DIALOG_ERANGE: 
{ 
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_ERANGE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Zasi?g","Wpisz nowy zasi?g","Ok","Wyjdz"); 
new id GetPVarInt(playerid,"selected"); 
SpeedCameras[id][_range] = strval(inputtext); 
SaveCamera(id); 
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sisis","Zasi?g fotoradaru ID: ",id," zosta? pomy?lnie zaktualizowany: ",strval(inputtext),"."); 
} 
case DIALOG_ELIMIT: 
{ 
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_ELIMIT,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Limit","Wpisz nowy limit predko?ci","Ok","Wyjdz"); 
new id GetPVarInt(playerid,"selected"); 
SpeedCameras[id][_limit] = strval(inputtext); 
SaveCamera(id); 
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sisis","Limit pr?dko?ci fotoradaru ID:",id," zosta? pomy?lnie zaktualizowany: ",strval(inputtext),"."); 
} 
case DIALOG_EFINE: 
{ 
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_EFINE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - Kary","Wpisz now? kare","Ok","Wyjdz"); 
new id GetPVarInt(playerid,"selected"); 
SpeedCameras[id][_fine] = strval(inputtext); 
SaveCamera(id); 
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sisis","Kara fotoradaru ID: ",GetPVarInt(playerid,"selected")," zosta?a pomy?lnie zaktualizowana: ",strval(inputtext),"."); 
} 
case DIALOG_ETYPE: 
{ 
if(!strlen(inputtext) || strval(inputtext) != && strval(inputtext) != 1) return ShowPlayerDialog(playerid,DIALOG_ETYPE,DIALOG_STYLE_INPUT,"{00A5FF}Fotoradary {FFFFFF}- {FFDC00}Edycja - MP/h | KM/h ","Wpisz 1 aby u?ywa? mp/h\nWpisz 0 aby u?ywa? km/h","Ok","Wyjdz"); 
new id GetPVarInt(playerid,"selected"); 
SpeedCameras[id][_usemph] = strval(inputtext); 
if(strval(inputtext) == 1) 
{ 
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sis","Fotoradar ID: ",GetPVarInt(playerid,"selected")," mierzy pr?dko?? w mph."); 
} else { 
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sis","Fotoradar ID: ",GetPVarInt(playerid,"selected")," mierzy pr?dko?? w kmh."); 
} 
} 
case DIALOG_LABEL: 
{ 
new id GetPVarInt(playerid,"selected"); 
if(!strlen(inputtext)) 
{ 
if(SpeedCameras[id][_activelabel] == true) 
{ 
Delete3DTextLabel(SpeedCameras[id][_label]); 
SpeedCameras[id][_activelabel] = falseSpeedCameras[id][_labeltxt] = 0; 
} 
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sis","Wiadomo?? fotoradaru ID: ",GetPVarInt(playerid,"selected")," pomy?lnie usuni?ta."); 
} else { 
if(SpeedCameras[id][_activelabel] == true) 
{ 
format(SpeedCameras[id][_labeltxt],128,"%s",inputtext); 
UpdateCameraLabel(SpeedCameras[id][_label],inputtext); 
} else { 
SpeedCameras[id][_activelabel] = trueformat(SpeedCameras[id][_labeltxt],128,"%s",inputtext); 
SpeedCameras[id][_label] = AttachLabelToCamera(id,inputtext); 
} 
SendClientMessageEx(playerid,KOLOR_ZIELONY,"sisss","Wiadomo?? fotoradaru ID: ",GetPVarInt(playerid,"selected")," zosta?a pomy?lnie zaktualizowana: ",inputtext,"."); 
} 
SaveCamera(id); 
} 
} 
return 0; 
} 
//=================================================================================================== 
// Functions 
//=================================================================================================== 
stock LoadCameras() 
{ 
new file[64]; 
for(new 0;i<CAMERA_LIMIT;i++) 
{ 
format(file,sizeof file,FOTORADARY,i); 
if(fexist(file)) 
{ 
INI_ParseFile(file,"LoadCam",.bExtra true,.extra i); 
#if STREAMER_ENABLED == true 
SpeedCameras[i][_objectid] = STREAMER_ADD(18880,SpeedCameras[i][_x],SpeedCameras[i][_y],SpeedCameras[i][_z],0,0,SpeedCameras[i][_rot]); 

} 


A teraz ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-22, 02:35


Cycu_kiepski







Wiek: 28
Na forum: 5234 dni
Posty: 40
Nick w MP: Pawcio66

Piwa: 1

Respekt: 50

to samo cholera ;/ nic si? nie zmieni?o ;/

[ Dodano: 2014-12-22, 03:03 ]
Dobra to dzia?a ale teraz jest nast?pny problem bo jade 170 km/h a mi pisze ?e jecha?em 123 km/h a maksymalna predkosc fotoradaru 120

[ Dodano: 2014-12-22, 11:12 ]
Czyli takjakby fotoradar zawyza? kilometry co zrobi? ;/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-22, 12:00


Colin_Carleone







Wiek: 30
Na forum: 5725 dni
Posty: 373

Piwa: 4800

Respekt: 83,3

Cycu_kiepski, to ja nwm o co chodzi. Ale mam dla ciebie taki sam skrypt tyle ?e nie z gui. Obczaj to Link.

Postaw piwo autorowi tego posta
 

 
Tagi: fotoradary
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