[Pomoć] Komanda /prison !!

Započeo sedin007, Januar 06, 2012, 10:14:27 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: San Andreas RPG/DM
Detaljan opis problema: Kada udem IG kucam /prison nista ne izbacuje moze li mi neko uraditi kako treba obadvije komande i /prison i /unprison ??
Dio skripte:if(strcmp(cmd, "/prison", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
   tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_DGOLD,"KORISTENJE: /prison [ID/DioImena] [minuta] [razlog]");
return 1;
}
new ptime;
giveplayerid = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
ptime = strval(tmp);
if (PlayerInfo[playerid][pAllowedTam] == 1)
{
if(IsPlayerConnected(giveplayerid))
    {
        if(giveplayerid != INVALID_PLAYER_ID)
        {
        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))
ResetPlayerWeapons(giveplayerid);
WantedPoints[giveplayerid] = 0;
SetPlayerSkin(giveplayerid, 162);
PlayerInfo[giveplayerid][pTamnica] = 1;
PlayerInfo[giveplayerid][pTamtime] = ptime*60;
SetPlayerInterior(giveplayerid, 0);
SetPlayerPos(giveplayerid, 1794.6628,-1543.8092,2913.9067);
GetPlayerName(playerid, sendername, sizeof(sendername));
TextDrawShowForPlayer(giveplayerid, Tamnica);
format(string,sizeof string,"~r~TAMNICA: ~w~%d",PlayerInfo[giveplayerid][pTamtime]); //quickly doing a small update on fuel (so it wont jump from 100 to its real value)
                        TextDrawSetString(Tamnica,string);
                        format(string, sizeof(string), "SERVER: %s je postavljen u tamnicu od administrator %s na %d minuta. Razlog: %s.", giveplayer, sendername, ptime, (result));
SendClientMessageToAll(COLOR_LIGHTRED,string);
SetPlayerWantedLevel(giveplayerid, 0);
}
}
else
{
            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))
printf("AdmWarn: Administrator %s je stavio %s u tamnicu na %d minuta.Razlog: %s.",sendername,  giveplayer, ptime , (result));
format(string, sizeof(string), "SERVER: %s(OFFLINE) je postavljen u tamnicu od administrator %s na %d minuta. Razlog: %s.", giveplayerid, sendername, ptime, (result));
SendClientMessageToAll(COLOR_LIGHTRED,string);
ResetPlayerWeapons(giveplayerid);
WantedPoints[giveplayerid] = 0;
SetPlayerSkin(giveplayerid, 162);
PlayerInfo[giveplayerid][pTamnica] = 1;
PlayerInfo[giveplayerid][pTamtime] = ptime*60;
SetPlayerInterior(giveplayerid, 0);
SetPlayerPos(giveplayerid, 1794.6628,-1543.8092,2913.9067);
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessage(giveplayerid, COLOR_GOLD, string);
SetPlayerWantedLevel(giveplayerid, 0);
}
}
}
return 1;
}
if(strcmp(cmd, "/unprison",true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if (PlayerInfo[playerid][pAllowedTam] == 0)
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR:Niste autorizirani da koristite ovu komandu.");
            return 1;
        }
         tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_DGOLD, "KORISTENJE: /unprison [ID/DioImena]");
return 1;
}
giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
        if(giveplayerid != INVALID_PLAYER_ID)
        {
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
printf("AdmWarn: Administrator %s je izbavio igraca %s iz tamnice.",sendername,  giveplayer);
WantedPoints[giveplayerid] = 0;
WantedLevel[giveplayerid] = 0;
PlayerInfo[giveplayerid][pTamnica] = 0;
PlayerInfo[giveplayerid][pTamtime] = 0;
TextDrawHideForPlayer(giveplayerid, Tamnica);
            SetPlayerPos(giveplayerid, 1553.3618,-1674.5177,16.1953);
            SetPlayerInterior(giveplayerid, 0);
        }
}
else
{
    SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Izabrani igrac je trenutno offline - pokusajte kasnije.");
    return 1;
}
    }
    return 1;
}

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