Skripta koju koristim: UP:RP
Detaljan opis problema: Pozdrav svima treba mi komanda za policiju kad kuca policajac /stop da mu izbaci plavim slovima stop policija zahtijeva da stanete ili parkirate pored tako nesto pa ako netko ima da mi pokaze kako se radi ili ako ima to vec urađeno da mi da ako je moguce naravno sa svojim creditsima al da je u YCMD
Dio skripte: Nije potrebno
Neke slike/video za lakse dobivanje pomoci(neobavezno):
[POMOC]KOMANDE /STOP
257
pregleda
9
postova
15. Jul 2014.
Evo ovo ti je za CTRL !
if( newkeys == KEY_ACTION ) // STOJ POLICIJA TEST ZA POLICIJU [ ] CTRL
{
new string;
if(IsPlayerInAnyVehicle(playerid)) // funkcionise samo kad je u vozilu
{
if(PI == 1 || PI == 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid, pX, pY, pZ);
PlayAudioStreamForPlayer(playerid, "http://dl.dropbox.com/u/43192164/SAMP/police/M F 1.mp3", X, Y, Z, 1);
format(string, sizeof(string), "{0084e3}[{FFFFFF}STOP POLICIJA{0084e3}]: {0084e3}Policajac %s vam naredjuje da stanete i pokazete dozvole /pdozvole !!!", sendername);
ProxDetector(30.0, playerid, string, COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
return 1;
}
}
}15. Jul 2014.
imas srece sto nisam lose volje ali nismo mi ovde da ti radimo komande
YCMD:stop(playerid,params[],help)
{
// proveri da li je policajac
new string [ 200 ];
format(string, sizeof(string), "stop policija zahteva da stanete!");
ProxDetector(20.0, playerid, string, 0xE6E6E6E6, 0xE6E6E6E6, 0xE6E6E6E6, 0xE6E6E6E6, 0xE6E6E6E6);
return true;
}
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
{
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SendClientMessage(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
}
}
}
return true;
}15. Jul 2014.
Ispricavam se na postu ali bolje je ovako bolje da se nemoze pomaknut da bude freezan i onda komanda unstop da ga unfreeze
YCMD:stop(playerid,params[],help)
{
// proveri da li je policajac
new string [ 200 ],id;
TogglePlayerControllable(id,0);
format(string, sizeof(string), "Policajac je zaustavio %s");
ProxDetector(20.0, playerid, string, 0xE6E6E6E6, 0xE6E6E6E6, 0xE6E6E6E6, 0xE6E6E6E6, 0xE6E6E6E6);
return true;
}
[YCMD:unstop(playerid,params[],help)
{
new id;
TogglePlayerControllable(id,1);
return true;
}
YCMD:stop(playerid,params[],help)
{
// proveri da li je policajac
new string [ 200 ],id;
TogglePlayerControllable(id,0);
format(string, sizeof(string), "Policajac je zaustavio %s");
ProxDetector(20.0, playerid, string, 0xE6E6E6E6, 0xE6E6E6E6, 0xE6E6E6E6, 0xE6E6E6E6, 0xE6E6E6E6);
return true;
}
[YCMD:unstop(playerid,params[],help)
{
new id;
TogglePlayerControllable(id,1);
return true;
}
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava