Započeo |LOB| Robi.pwn
•20. Maj 2013.• Zaključano[Pomoc] ProxDetector u komandi
711
pregleda
7
postova
Enforcer
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
301
Postovi:
98
Teme:
Pridružio se:Nov. 2012
20. Maj 2013.
Skripta koju koristim:Moj gm od 0
Detaljan opis problema:
Kako da u ovu komandu stavim proxDetector da znaci kad uzme drogu piše
Primjer
Dio skripte:
Komanda
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Detaljan opis problema:
Kako da u ovu komandu stavim proxDetector da znaci kad uzme drogu piše
Primjer
Robi_Corleone vadi te koristi drogu!Dio skripte:
Komanda
CMD:usedrugs(playerid,params[])
{
if(PlayerInfo > 1)
{
new Float:Health;
GetPlayerHealth(playerid, Health);
SetPlayerHealth(playerid, Health+5);
PlayerInfo -= 1;
SendClientMessage(playerid,-1,"{FF0000} Uzima te koristi drogu!");
}
else
{
SendClientMessage(playerid,-1,"{FF0000} Nemate droge!");
}
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno):
Made Man
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
467
Postovi:
71
Teme:
Pridružio se:Mar. 2013
20. Maj 2013.
CMD:usedrugs(playerid,params[])
{
new pName;
if(PlayerInfo > 1)
{
new Float:Health;
GetPlayerHealth(playerid, Health);
SetPlayerHealth(playerid, Health+5);
PlayerInfo -= 1;
format(string, sizeof(string), "%s vadi te koristi drogu!", pname);
RaplayProxDetector(20.0, playerid, string, 0x586433FF,0x586433FF,0x586433FF,0x586433FF,0x586433FF);
SendClientMessage(playerid,-1,"{FF0000} Uzima te koristi drogu!");
}
else
{
SendClientMessage(playerid,-1,"{FF0000} Nemate droge!");
}
return 1;
}
ovo stavi pri kraju skripte
forward RaplayProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public RaplayProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
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);
//radi = 2.0; //Trigger Radius
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);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SCM(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SCM(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SCM(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SCM(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SCM(i, col5, string);
}
}
}
}Enforcer
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
301
Postovi:
98
Teme:
Pridružio se:Nov. 2012
Kingpin
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,208
Postovi:
44
Teme:
Pridružio se:Jan. 2012
20. Maj 2013.
evo ga
CMD:usedrugs(playerid,params[])
{
if(PlayerInfo > 1)
{
new Float:Health;
GetPlayerHealth(playerid, Health);
SetPlayerHealth(playerid, Health+5);
PlayerInfo -= 1;
SendClientMessage(playerid,-1,"{FF0000} Uzima te koristi drogu!");
new ime;
GetPlayerName(playerid, ime, sizeof(ime));
format(CmdString, 64, "** %s vadi te koristi drogu!", ime);
ProxDetector(10.0, playerid, string, boja,boja,boja,boja,boja);
}
else
{
SendClientMessage(playerid,-1,"{FF0000} Nemate droge!");
}
return 1;
}Kingpin
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,208
Postovi:
44
Teme:
Pridružio se:Jan. 2012
20. Maj 2013.
Quote from May 20, 2013, 10:01 am:
CMD:usedrugs(playerid,params[])
{
new pName;
if(PlayerInfo > 1)
{
new Float:Health;
GetPlayerHealth(playerid, Health);
SetPlayerHealth(playerid, Health+5);
PlayerInfo -= 1;
format(string, sizeof(string), "%s vadi te koristi drogu!", pname);
RaplayProxDetector(20.0, playerid, string, 0x586433FF,0x586433FF,0x586433FF,0x586433FF,0x586433FF);
SendClientMessage(playerid,-1,"{FF0000} Uzima te koristi drogu!");
}
else
{
SendClientMessage(playerid,-1,"{FF0000} Nemate droge!");
}
return 1;
}
ovo stavi pri kraju skripte
forward RaplayProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public RaplayProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
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);
//radi = 2.0; //Trigger Radius
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);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SCM(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SCM(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SCM(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SCM(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SCM(i, col5, string);
}
}
}
}nece ti valjat di ti iscitava ime i kaki raplay😕
sory na dp
Enforcer
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
301
Postovi:
98
Teme:
Pridružio se:Nov. 2012
20. Maj 2013.
C:\Users\Brks\Desktop\SAMP\gamemodes\lob1.pwn(1074) : error 017: undefined symbol "CmdString"
C:\Users\Brks\Desktop\SAMP\gamemodes\lob1.pwn(1075) : error 017: undefined symbol "string"
C:\Users\Brks\Desktop\SAMP\gamemodes\lob1.pwn(1075) : error 017: undefined symbol "string"
Enforcer
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
209
Postovi:
50
Teme:
Pridružio se:Maj 2012
20. Maj 2013.
Trebat ce ti Foreach;
Evo ti i boja:
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
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);
//radi = 2.0; //Trigger Radius
foreach(Player, i)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
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 1;
}CMD:usedrugs(playerid,params[])
{
new ime, string;
if(PlayerInfo > 1)
{
new Float:Health;
GetPlayerName(playerid, ime, sizeof(ime));
GetPlayerHealth(playerid, Health);
SetPlayerHealth(playerid, Health+5);
PlayerInfo -= 1;
format(string, 64, "* %s vadi i smrce kokain.", ime);
ProxDetector(10.0, playerid, string, boja, boja, boja, boja, boja);
SendClientMessage(playerid,-1,"{FF0000} Uzima te koristi drogu!");
}
else
{
SendClientMessage(playerid,-1,"{FF0000} Nemate droge!");
}
return 1;
}Evo ti i boja:
#define COLOR_PURPLE 0xC2A2DAAAMorate biti prijavljeni da biste odgovorili na ovu temu.
Prijava