[Pomoc] Objekat

Započeo Michael!, Novembar 13, 2010, 18:31:35 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Pozdrav. Ovako našao sam jedan zatvor na forumu na sampu, i ubacio ga da mi bude kada admin zatvori sa /ajail. To mi je samo test, ali imam jedan problem, desi mi se ovo :



Znači tako mi izgleda u enterijeru, zašto ja neznam stvarno, pomozite molim vas :(
Poslednja Izmena: Novembar 14, 2010, 11:30:54 PRE PODNE od ellyx


Respect to: $--L84S--$, EP,-300-, Extreme, Gonss, мσмαк. ^ [5], Alexandar? Coreli..






OTIÅ AO SA BALKAN-SAMPA. Kontakt: [email protected]

ja nezz šta je ovo,nezz da li se može ali pomješani su ID-evi interijera i objekata nezz :S možda je picasso radio :P

Citat: Samper4life poslato Novembar 13, 2010, 20:21:35 POSLE PODNE
ja nezz šta je ovo,nezz da li se može ali pomješani su ID-evi interijera i objekata nezz :S možda je picasso radio :P

Nezz našao sam zatvor na samp forumu, i piše mi kod da ubacim ali nezz ja gdje, evo taj kod možda njeg moram ubacit.

if(strcmp(cmd, "/prison", true) == 0)
{       
            SetPlayerPos(playerid, 1779.3185,-1576.1315,1734.9430);       
            SendClientMessage(playerid, COLOR_WHITE, "You have been teleported to the prison!");       
            return 1;   
}


Respect to: $--L84S--$, EP,-300-, Extreme, Gonss, мσмαк. ^ [5], Alexandar? Coreli..






OTIÅ AO SA BALKAN-SAMPA. Kontakt: [email protected]

Kako ide tvoja komanda da nekog zatvoris?

Citat: ‎(à¥"_à¥") - ČιѕÑ,σ яÑ"кяÑ"αÑ,ινησ - (à¥"_à¥") poslato Novembar 13, 2010, 20:36:16 POSLE PODNE
Kako ide tvoja komanda da nekog zatvoris?

Ja sam stavio tamo gdje piše /ajail tamo sam stavio kordinatu, ovu gore navedenu, evo vidiš
}
if(strcmp(cmd, "/ajail", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ajail [playerid/PartOfName] [time(minutes)] [reason]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
    if(IsPlayerConnected(playa))
    {
        if(playa != INVALID_PLAYER_ID)
        {
        GetPlayerName(playa, 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, "USAGE: /ajail [playerid/PartOfName] [time(minutes)] [reason]");
return 1;
}
format(string, sizeof(string), "* Zatvorio si  %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* You were Jailed by Admin %s.", sendername);
SendClientMessage(playa, COLOR_LIGHTRED, string);
SafeResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = money*60;
SetPlayerInterior(playa, 6);
PlayerInfo[playa][pInt] = 6;
SetPlayerPos(playa, 1779.3185,-1576.1315,1734.9430);
format(string, sizeof(string), "You are jailed for %d minutes.   Bail: Unable", money);
SendClientMessage(playa, COLOR_WHITE, string);
format(string, 256, "AdmCmd: %s has been jailed by Admin %s [Reason: %s]", giveplayer, sendername, (result));
BroadCast(COLOR_LIGHTRED,string);
format(string, sizeof(string), "AdmCmd: %s has been Admin-jailed by %s [Reason: %s]", giveplayer, sendername, (result));
printf("%s",string);
}
}


Respect to: $--L84S--$, EP,-300-, Extreme, Gonss, мσмαк. ^ [5], Alexandar? Coreli..






OTIÅ AO SA BALKAN-SAMPA. Kontakt: [email protected]

Kao sto sam i pretpostavio
SetPlayerInterior(playa, 6);
PlayerInfo[playa][pInt] = 6;

Umjesto 6 stavi 0...

Citat: ‎(à¥"_à¥") - ČιѕÑ,σ яÑ"кяÑ"αÑ,ινησ - (à¥"_à¥") poslato Novembar 13, 2010, 20:52:32 POSLE PODNE
Kao sto sam i pretpostavio
SetPlayerInterior(playa, 6);
PlayerInfo[playa][pInt] = 6;

Umjesto 6 stavi 0...

Ponovo isti problem, pomozite molim vas




Evo kako kod izgleda:
}
if(strcmp(cmd, "/ajail", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ajail [playerid/PartOfName] [time(minutes)] [reason]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
    if(IsPlayerConnected(playa))
    {
        if(playa != INVALID_PLAYER_ID)
        {
        GetPlayerName(playa, 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, "USAGE: /ajail [playerid/PartOfName] [time(minutes)] [reason]");
return 1;
}
format(string, sizeof(string), "* Zatvorio si  %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Zatvoren si od admina %s.", sendername);
SendClientMessage(playa, COLOR_LIGHTRED, string);
SafeResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = money*60;
SetPlayerInterior(playa, 6);
PlayerInfo[playa][pInt] = 6;
SetPlayerPos(playa, 1779.3185,-1576.1315,1734.9430);
format(string, sizeof(string), "Zatvoren si na %d minuta.   Bail: Unable", money);
SendClientMessage(playa, COLOR_WHITE, string);
format(string, 256, "AdmCmd: %s has been jailed by Admin %s [Reason: %s]", giveplayer, sendername, (result));
BroadCast(COLOR_LIGHTRED,string);
format(string, sizeof(string), "AdmCmd: %s has been Admin-jailed by %s [Reason: %s]", giveplayer, sendername, (result));
printf("%s",string);
}


Pomagajte.


Respect to: $--L84S--$, EP,-300-, Extreme, Gonss, мσмαк. ^ [5], Alexandar? Coreli..






OTIÅ AO SA BALKAN-SAMPA. Kontakt: [email protected]

Citat: Hoxxy poslato Novembar 14, 2010, 13:27:27 POSLE PODNE
Lepo ti je rekao da stavis 0 umesto 6 a ti to nisi uradio.
Pa posto ne umes da zamenis jedan jedini broj, ja cu ti to uraditi :/

}
if(strcmp(cmd, "/ajail", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ajail [playerid/PartOfName] [time(minutes)] [reason]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
    if(IsPlayerConnected(playa))
    {
        if(playa != INVALID_PLAYER_ID)
        {
        GetPlayerName(playa, 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, "USAGE: /ajail [playerid/PartOfName] [time(minutes)] [reason]");
return 1;
}
format(string, sizeof(string), "* Zatvorio si  %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Zatvoren si od admina %s.", sendername);
SendClientMessage(playa, COLOR_LIGHTRED, string);
SafeResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = money*60;
SetPlayerInterior(playa, 0);
PlayerInfo[playa][pInt] = 0;
SetPlayerPos(playa, 1779.3185,-1576.1315,1734.9430);
format(string, sizeof(string), "Zatvoren si na %d minuta.   Bail: Unable", money);
SendClientMessage(playa, COLOR_WHITE, string);
format(string, 256, "AdmCmd: %s has been jailed by Admin %s [Reason: %s]", giveplayer, sendername, (result));
BroadCast(COLOR_LIGHTRED,string);
format(string, sizeof(string), "AdmCmd: %s has been Admin-jailed by %s [Reason: %s]", giveplayer, sendername, (result));
printf("%s",string);
}


Uradio i to opet niÅ¡ta, isto! Ja stvarno neznam do čega je  :-X


Respect to: $--L84S--$, EP,-300-, Extreme, Gonss, мσмαк. ^ [5], Alexandar? Coreli..






OTIÅ AO SA BALKAN-SAMPA. Kontakt: [email protected]