[POMOC]Prison

Započeo |Xeptic| Führer, Oktobar 19, 2010, 15:51:17 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Evo ovako znaci ja sam napravio komandu prison i stavio /prison id [razlog] i nema errora niti warninga i stisnem copmlie i sve je ok i upalim server (kucni) i idem /prison moj id a ili bilo sto i pise Igrac je Offline. Evo komanda:

if(strcmp(cmd, "/prison",true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
       if(PlayerInfo[playerid][pAdmin] < 2 || PlayerInfo[playerid][pGameMaster] >= 3)
       {
           SendClientMessage(playerid, COLOR_GREY, "   Nisi ovlasten !");
           return 1;
       }
        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, "KORISTENJE: /prison [playerid/PartOfName] [razlog]");
return 1;
}
giveplayerid = ReturnUser(tmp);
   if(IsPlayerConnected(giveplayerid))
   {
       if(giveplayerid != INVALID_PLAYER_ID)
       {
           new year, month,day;
getdate(year, month, day);
           GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Smjestio si %s u Fort DeMorgan.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Smjesten si u Fort DeMorgan od Admina %s, budes li DM-ao ide vam WARN.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
GameTextForPlayer(giveplayerid, "~w~Dobrodosli u ~n~~r~Fort DeMorgan", 5000, 3);
format(string, sizeof(string), "Fort Demorgan || %s  od strane Admina %s |Razlog: %s|Datum: (%d-%d-%d)", giveplayer, sendername, (result), day,month,year);
SendClientMessageToAll(COLOR_LIGHTRED, string);
WantedPoints[giveplayerid] = 0;
WantedLevel[giveplayerid] = 0;
PlayerInfo[giveplayerid][pJailed] = 2;
PlayerInfo[giveplayerid][pJailTime] = 3600;
           SetPlayerPos(giveplayerid, 107.2300,1920.6311,18.5208);
           SetPlayerWantedLevel(giveplayerid, 0);
SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
       }
}
else
{
   SendClientMessage(playerid, COLOR_GREY, "   Igrac je Offline !");
   return 1;
}
   }
   return 1;
}


Hvala Unaprijed !
Poslednja Izmena: Oktobar 19, 2010, 15:52:04 POSLE PODNE od Apokalipsa

tu di ti je ovo stavi
{
            SendClientMessage(playerid, COLOR_GREY, "   Nisi ovlasten !");
            return 1;
        }
                 tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
skype: marko.pintaric1 :)

Evo ovako sad komanda:

//-----------------------------------[Prison]-------------------------------------------------------------------------
if(strcmp(cmd, "/prison",true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] < 2 || PlayerInfo[playerid][pGameMaster] >= 3)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Nisi ovlasten !");
            return 1;
        }
        tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
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, "KORISTENJE: /prison [playerid/PartOfName] [razlog]");
return 1;
}
giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
        if(giveplayerid != INVALID_PLAYER_ID)
        {
            new year, month,day;
getdate(year, month, day);
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Smjestio si %s u Fort DeMorgan.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* Smjesten si u Fort DeMorgan by Admin %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
GameTextForPlayer(giveplayerid, "~w~Dobrodosli u ~n~~r~Fort DeMorgan", 5000, 3);
format(string, sizeof(string), "Fort Demorgan || %s  od strane Admina %s |Razlog: %s|Datum: (%d-%d-%d)", giveplayer, sendername, (result), day,month,year);
SendClientMessageToAll(COLOR_LIGHTRED, string);
WantedPoints[giveplayerid] = 0;
WantedLevel[giveplayerid] = 0;
PlayerInfo[giveplayerid][pJailed] = 2;
PlayerInfo[giveplayerid][pJailTime] = 3600;
            SetPlayerPos(giveplayerid, 107.2300,1920.6311,18.5208);
            SetPlayerWantedLevel(giveplayerid, 0);
SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
        }
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Igrac je Offline !");
    return 1;
}
    }
    return 1;
}



ERRORI:

D:\MOD NOVI\gamemodes\test.pwn(1796) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1800) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1812) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1816) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1820) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1824) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1828) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1832) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1836) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1848) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1852) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1856) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1860) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1864) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1876) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1880) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1884) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1896) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(1900) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(3948) : error 004: function "CrimInRange" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(4205) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(4818) : error 004: function "PlayerToPoint" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(4909) : error 004: function "ProxDetector" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(5531) : error 004: function "IsABike" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(6700) : error 004: function "FixHour" is not implemented
D:\MOD NOVI\gamemodes\test.pwn(7585) : error 004: function "FixHour" is not implemented

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.



Kad izbrisem cijelu komandu i stavim normlanu sve je ok al zelim da ovako bude zato pls odg.
Poslednja Izmena: Oktobar 19, 2010, 18:19:28 POSLE PODNE od Apokalipsa