[Pomoc] /recon(/specplayer) i jos nesto

Započeo ., Oktobar 20, 2011, 08:57:11 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

.

*

Skripta koju koristim: San Andreas RPG/DM Edit
Detaljan opis problema:Ovako htio bih na /recon staviti kada igrac ode /reconoff da ag vrati na isto mjesto gdje je bio i da mu vrati oruzije koje je imao.Druga stvar ,htio bih na jednoj komandi sam vec napravio da osobu postavi u "tamnicu" dok je offline.Jos mi treba da nekako preko inputtexta napravim da kada ga kazni da pise taj dio imena koji je upiso admin.
Dio skripte: Postavim ako zatreba
Neke slike/video za lakse dobivanje pomoci(neobavezno): //

daj komandu za tamnicu
Vratio sam se ponovo ocekjute novi server...

.

*


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))
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);
ResetPlayerWeapons(giveplayerid);
WantedPoints[giveplayerid] = 0;
SetPlayerSkin(giveplayerid, 162);
PlayerInfo[giveplayerid][pTamnica] = 1;
PlayerInfo[giveplayerid][pTamtime] = ptime*60;
SetPlayerInterior(giveplayerid, 0);
SetPlayerPos(giveplayerid, 1792.8989,-1530.5420,2912.4915);
GetPlayerName(playerid, sendername, sizeof(sendername));
TextDrawShowForPlayer(giveplayerid, Tamnica);
SendClientMessage(giveplayerid, COLOR_GOLD, 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, 1792.8989,-1530.5420,2912.4915);
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;
}