[Pomoc] textdraw wanted. pomocccc plss

Započeo Otisao s Foruma!, Februar 20, 2012, 16:20:22 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

Daj ovamo /su komandu...

gledaj kako da uradis

Ovo na vrh skripte:
new Text:Textdraw0[MAX_PLAYERS];
new Text:Textdraw1[MAX_PLAYERS];
new Text:Textdraw2[MAX_PLAYERS];


zatim pod public OnPlayerConect stavis ovo:

// td 0
Textdraw0[playerid] = TextDrawCreate(235.000000,316.000000," ");
TextDrawAlignment(Textdraw0,0);
TextDrawBackgroundColor(Textdraw0,0x00000099);
TextDrawFont(Textdraw0,2);
TextDrawLetterSize(Textdraw0,0.599999,2.299999);
TextDrawColor(Textdraw0,0xff0000cc);
TextDrawSetOutline(Textdraw0,1);
TextDrawSetProportional(Textdraw0,1);
TextDrawSetShadow(Textdraw0,1);

// td 1
Textdraw1[playerid] = TextDrawCreate(178.000000,337.000000," ");
TextDrawAlignment(Textdraw1,0);
TextDrawBackgroundColor(Textdraw1,0x000000ff);
TextDrawFont(Textdraw1,2);
TextDrawLetterSize(Textdraw1,0.599999,1.900000);
TextDrawColor(Textdraw1,0xff0000ff);
TextDrawSetOutline(Textdraw1,1);
TextDrawSetProportional(Textdraw1,1);
TextDrawSetShadow(Textdraw1,1);

//td 2
Textdraw2[playerid] = TextDrawCreate(299.000000,338.000000," ");
TextDrawAlignment(Textdraw2,0);
TextDrawBackgroundColor(Textdraw2,0x000000ff);
TextDrawFont(Textdraw2,2);
TextDrawLetterSize(Textdraw2,0.799999,1.600000);
TextDrawColor(Textdraw2,0x0000ff66);
TextDrawSetOutline(Textdraw2,1);
TextDrawSetProportional(Textdraw2,1);
TextDrawSetShadow(Textdraw2,1);



Zatim u komandi SU podesis ovako:

new string[500];
format(string,sizeof(string),"%d",Ovde Varijablu za igracev wanted);// onaj text obavezno zamenis sa onim kako je u tvom modu definisana varijabla za wanted
TextDrawSetString(Textdraw0[id igraca koj ima wanted],string);
TextDrawShowForPlayer(playerid, Textdraw0[id igraca koj ima wanted]);


I ovo ce na td 0 staviti igracev trenutni wanted... zato sam i trazio komandu /su da mogu lepo da ti podesim, posto prema onom sto si mi poslao na pm, ne znas ni varijabla sta je..  ::)

evo komande xd--.

if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 2 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 2 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 1 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 1 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 11 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 11) { }
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Niste na duznosti!");
    return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: (/su)spect [ID Igraca/Dio Imena] [opis zlocina]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (gTeam[playerid] == 2 || IsACop(playerid))
{
if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
if (gTeam[giveplayerid] != 2)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: (/su)spect [ID Igraca/Dio Imena] [crime text]");
return 1;
}
if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 3; }
else { WantedPoints[giveplayerid]+= 2; }
SetPlayerCriminalEx(giveplayerid,playerid, result);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Ne mozete optuziti policajca !");
}
}
}
else
{
format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Niste Policajac / FBI / Swat !");
}
}
return 1;
}
[[/center]
DgL <3
Otisao s Foruma zz


nije "xD", pod hitno nauci sta je varijabl,a na PM sam ti pokazao, al nisi odgovorio...

izvoli:

if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 2 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 2 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 1 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 1 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 11 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 11) { }
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Niste na duznosti!");
    return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: (/su)spect [ID Igraca/Dio Imena] [opis zlocina]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (gTeam[playerid] == 2 || IsACop(playerid))
{
if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
if (gTeam[giveplayerid] != 2)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: (/su)spect [ID Igraca/Dio Imena] [crime text]");
return 1;
}
if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 3; }
else { WantedPoints[giveplayerid]+= 2; }
SetPlayerCriminalEx(giveplayerid,playerid, result);
new string55[500];
format(string55,sizeof(string55),"%d",WantedPoints[giveplayerid]);
TextDrawSetString(Textdraw0[giveplayerid],string55);
TextDrawShowForPlayer(playerid, Textdraw0[giveplayerid]);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Ne mozete optuziti policajca !");
}
}
}
else
{
format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "   Niste Policajac / FBI / Swat !");
}
}
return 1;
}



Pogledaj kako sam ja uradio, pa ti uradi za ostatak da zelis, napravi provere i slicno, to vec ti moras da radis...

Ovako ce igracu na TextDraw0 da prikaze koliko ima wanteda... naravno, koristi neki tajmer koji ces igracu sakriti taj textdraw, da mu nebude stalno an ekranu...

Ma nmvz mnmg to da ubacim komplikovano nmg da se zamaram lock!
[[/center]
DgL <3
Otisao s Foruma zz


Brate moras se malo potrudit,ako tako nastavis da odustajes od svega,od tebe nece nista biti :PP :D

Citat: ^HuDiGa.amx ^^. poslato Februar 21, 2012, 16:51:15 POSLE PODNE
Brate moras se malo potrudit,ako tako nastavis da odustajes od svega,od tebe nece nista biti :PP :D
Ne nabijaj postove nisam te nista pitao.
[[/center]
DgL <3
Otisao s Foruma zz


Mozes da ubacis i nije komplikovano, od svega odustajes, ako sam mogao da ti objasnim sve, mozes i ti da se potrudis da ubacis nesto... da se niko od nas nije potrudio, nebi ni znali da skriptamo... tebi je sve tesko, tako nikad neces nauciti da skriptas... probaj da ubacis...

za tajmer evo ti tut-a


http://wiki.sa-mp.com/wiki/SetTimerEx

Nmvz brate kad nece probavao sam hvala tebi u svakom slucaju.  ;)
[[/center]
DgL <3
Otisao s Foruma zz