[POMOC] Strcmp u YCMD ?

Započeo lv
16. Jun 2014. Zaključano
481
pregleda
5
postova
Vukasin
4
Made Man
16. Jun 2014.
Skripta koju koristim: Tesketov radar system i UP RP v0.1
Detaljan opis problema: U Tesketovom sistemu , proces komandi je strcmp, prebacio sam komande u YCMD, pa ako bi neko mogao da mi prebaci ove dve linije u YCMD 🙂
Dio skripte:
tmp = strtok(cmdtext, idx);

if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "KORISTI: /merac napravi [ogranicenje brzine]");

Neke slike/video za lakse dobivanje pomoci(neobavezno):
James_SmithXDl
6
OG Legend
16. Jun 2014.
za ovo mozes koristis

if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "KORISTI: /merac napravi [ogranicenje brzine]");
if ( isnull ( params ) )

daj da vidim cmd pa da ti prebacim
Vukasin
4
Made Man
16. Jun 2014.
YCMD:napravimerac(playerid,params[],help)
{
        if(PlayerInfo < 6) return SCM(playerid,-1,""BELA"{FFCC00}[BV:RP]{FFFFFF} "SPLAVA"Samo Vlasnik!");
new tmp;
tmp = strtok(cmdtext, idx);

if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "KORISTI: /merac napravi [ogranicenje brzine]");



new brzince=strval(tmp);

if(brzince<1||brzince>500) return SendClientMessage(playerid, -1, "{FFCC00}[BV:RP]{FFFFFF}Pogresan unos !");

new s;

for(new i=1;i<999;i++)
{
new string;
format(string,200,"merac_brzine/meraci/Merac_%d.ini",i);
if(!fexist(string))
{
s=i;
i=999;
}
}

new Float:x, Float:y, Float:z,Float:zs;
GetPlayerPos(playerid, x, y, zs);
z=zs+2;
new Float:Angle;
GetPlayerFacingAngle(playerid, Angle);
vaza_brzina = CreateObject(19329,  x, y, z +0.8583, 0.0000, 0.0000, Angle, 50000.0);
SetObjectMaterialText(vaza_brzina, "VASA BRZINA km/h", 0, 50, "Arial", 17, 1, -65536, -256, 1);
brzina = CreateObject(19329,  x, y, z, 0.0000, 0.0000, Angle, 50000.0);
SetObjectMaterialText(brzina, "000", 0, 50, "Small Fonts", 47, 1, -256, 52568607, 1);
uspori = CreateObject(19329,  x, y, z -0.8583, 0.0000, 0.0000, Angle, 50000.0);
SetObjectMaterialText(uspori, "normalno", 0, 50, "Arial", 25, 1, -65536, -256, 1);
pozadina=CreateObject(2632,  x, y, z -0.1583, 0.0000, 270.0000, Angle+90, 50000.0);//pozadina
SetObjectMaterialText(pozadina, "s", 0, 50, "Arial", 2, 0, -1, -16777216, 1);
stub=CreateObject(1251,  x, y, z -4.7108, 90.0000, 0.0000, Angle, 50000.0);//stub

SetPlayerPos(playerid, x, y, zs+5);

MB = x;
MB = y;
MB = zs;
MB  = Angle;
MB  = 70;
SacuvajMerac(s);
return 1;
}
James_SmithXDl
6
OG Legend
16. Jun 2014.
YCMD:napravimerac(playerid,params[],help)
{
        new brzince,s;
        if(PlayerInfo < 6) return SCM(playerid,-1,""BELA"{FFCC00}[BV:RP]{FFFFFF} "SPLAVA"Samo Vlasnik!");
if(sscanf(params, "i", brzince)) return SendClientMessage(playerid, 0xFFFFFFFF, "KORISTI: /merac napravi [ogranicenje brzine]");
if(brzince<1||brzince>500) return SendClientMessage(playerid, -1, "{FFCC00}[BV:RP]{FFFFFF}Pogresan unos !");

for(new i=1;i<999;i++)
{
new string;
format(string,200,"merac_brzine/meraci/Merac_%d.ini",i);
if(!fexist(string))
{
s=i;
i=999;
}
}

new Float:x, Float:y, Float:z,Float:zs;
GetPlayerPos(playerid, x, y, zs);
z=zs+2;
new Float:Angle;
GetPlayerFacingAngle(playerid, Angle);
vaza_brzina = CreateObject(19329,  x, y, z +0.8583, 0.0000, 0.0000, Angle, 50000.0);
SetObjectMaterialText(vaza_brzina, "VASA BRZINA km/h", 0, 50, "Arial", 17, 1, -65536, -256, 1);
brzina = CreateObject(19329,  x, y, z, 0.0000, 0.0000, Angle, 50000.0);
SetObjectMaterialText(brzina, "000", 0, 50, "Small Fonts", 47, 1, -256, 52568607, 1);
uspori = CreateObject(19329,  x, y, z -0.8583, 0.0000, 0.0000, Angle, 50000.0);
SetObjectMaterialText(uspori, "normalno", 0, 50, "Arial", 25, 1, -65536, -256, 1);
pozadina=CreateObject(2632,  x, y, z -0.1583, 0.0000, 270.0000, Angle+90, 50000.0);//pozadina
SetObjectMaterialText(pozadina, "s", 0, 50, "Arial", 2, 0, -1, -16777216, 1);
stub=CreateObject(1251,  x, y, z -4.7108, 90.0000, 0.0000, Angle, 50000.0);//stub

SetPlayerPos(playerid, x, y, zs+5);

MB = x;
MB = y;
MB = zs;
MB  = Angle;
MB  = 70;
SacuvajMerac(s);
return 1;
}
Vukasin
4
Made Man
16. Jun 2014.
Sad cu da proverim IG da li je sve ok 🙂

EDIT: Sve ok , hvala 🙂 Moze ljock 😄

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha