[POMOC] Komanda /ajail

Započeo Frile, April 04, 2011, 22:15:47 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:GTA RP
Detaljan opis problema: napravio sam zatvor preko mta sa posebnim celijama i napravio sam da kada uhapsis nekoga stavlja igraca random u celije, ali onda mi se desio ovaj problem kada sam testirao server sa drugom ja kucam /ajail id vrijeme i razlog da stavim njega u jail a ono pise njemu da je u jail portuje ga negdje u vazduhu a mene ubaci u zatvor, pa dali neko zna do cega je problem evo komanda
Dio skripte: 
if(strcmp(cmd, "/ajail", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /ajail [playerid/Nik] [vrijeme(minuti)] [razlog]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGm] >= 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, "Koriscenje: /ajail [playerid/Nik] [vrijeme(minuti)] [razlog]");
return 1;
}
format(string, sizeof(string), "* Ubacili ste u Jail %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Ubaceni ste u Jail od Admin %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;
switch(random(24))
                        {
                        case 0: SetPlayerPos(playerid, 1757.7479,-1563.0048,1734.9430);
                        case 1: SetPlayerPos(playerid, 1761.9458,-1562.6422,1734.9430);
                        case 2: SetPlayerPos(playerid, 1766.0544,-1562.1848,1734.9430);
                        case 3: SetPlayerPos(playerid, 1770.6321,-1562.6045,1734.9430);
                        case 4: SetPlayerPos(playerid, 1775.1123,-1562.9954,1734.9430);
                        case 5: SetPlayerPos(playerid, 1779.0582,-1562.4333,1734.9430);
                        case 6: SetPlayerPos(playerid, 1778.7703,-1582.5491,1734.9430);
                        case 7: SetPlayerPos(playerid, 1774.3679,-1582.9398,1734.9430);
                        case 8: SetPlayerPos(playerid, 1770.0060,-1582.8011,1734.9430);
                        case 9: SetPlayerPos(playerid, 1765.8530,-1583.4468,1734.9430);
                        case 10: SetPlayerPos(playerid, 1761.3236,-1582.5583,1734.9430);
                        case 11: SetPlayerPos(playerid, 1757.7047,-1582.9205,1734.9430);
                        case 12: SetPlayerPos(playerid, 1757.8369,-1564.3037,1738.6935);
                        case 13: SetPlayerPos(playerid, 1761.7532,-1564.3408,1738.6935);
                        case 14: SetPlayerPos(playerid, 1765.9097,-1563.0442,1738.6935);
                        case 15: SetPlayerPos(playerid, 1770.0720,-1563.6960,1738.6935);
                        case 16: SetPlayerPos(playerid, 1774.7206,-1563.3007,1738.6935);
                        case 17: SetPlayerPos(playerid, 1778.7098,-1562.4268,1738.6938);
                        case 18: SetPlayerPos(playerid, 1778.8673,-1583.1049,1738.7177);
                        case 19: SetPlayerPos(playerid, 1774.4983,-1582.8956,1738.7173);
                        case 20: SetPlayerPos(playerid, 1770.2850,-1582.7064,1738.7173);
                        case 21: SetPlayerPos(playerid, 1765.9250,-1582.8099,1738.7173);
                        case 22: SetPlayerPos(playerid, 1761.6605,-1583.0819,1738.7173);
                        case 23: SetPlayerPos(playerid, 1757.5471,-1583.0542,1738.7173);
                        }
format(string, sizeof(string), "Ubaceni ste u jail na %d minuta.   Kaucija: Ne", money);
SendClientMessage(playa, COLOR_WHITE, string);
format(string, 256, "AdmCmd: %s je ubacen u Jail od Admin %s [Razlog: %s]", giveplayer, sendername, (result));
BroadCast(COLOR_LIGHTRED,string);
format(string, sizeof(string), "AdmCmd: %s je ubacen u Jail od Admin %s [Razlog: %s]", giveplayer, sendername, (result));
printf("%s",string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Niste ovlasceni da koristite tu komandu!");
}
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):