[Pomoc] CUff

Započeo Petar Pan, Jul 23, 2011, 23:45:54 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:PG
Detaljan opis problema:Napravio sam ciu kako da napravim da moze stavljati lisice i skidati

Komanda cuff i uncuf:

CMD:cuff(playerid, params[])
{
new string[128];
new idx;

new  sendername[MAX_PLAYER_NAME];
new  giveplayer[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
if(IsACop(playerid))
{
    temp = strtok(params, idx);
if(!strlen(temp)) {
SendClientMessage(playerid, COLOR_WHITE, "{168BFF}INFO: {959561} /cuff {959561}[ID/DioImena] {838361}");
return 1;
}
giveplayerid = ReturnUser(temp);
    if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
        if(IsACop(giveplayerid))
        {
            SendClientMessage(playerid, COLOR_GREY, "   Ne mozes cuffovati PD/FBI/SWAT/CIA !");
        return 1;
        }
    if(PlayerCuffed[giveplayerid] > 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   Igracu su vec stavljene lisice !");
        return 1;
    }
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
    new car = GetPlayerVehicleID(playerid);
    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Ne mozes sam sebe cuffovati!"); return 1; }
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
    {
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "%s ti je stavio lisice, sve dok ih on ne skine.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Stavio si lisice igracu %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " %s vadi lisice i stavlja ih %s.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~r~Uhvacen", 2500, 3);
TogglePlayerControllable(giveplayerid, 0);
PlayerCuffed[giveplayerid] = 2;
PlayerCuffedTime[giveplayerid] = 180;
    }
    else
    {
        SendClientMessage(playerid, COLOR_GREY, "   Igrac nije u vozilu ili ti nisi vozac !");
        return 1;
    }
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije u tvojoj blizini !");
    return 1;
}
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije online!");
    return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   Nisi policajac / FBI / National Guard /CIA !");
}
}
return 1;
}
CMD:uncuff(playerid, params[])
{
new string[128];
new idx;

new  sendername[MAX_PLAYER_NAME];
new  giveplayer[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
if(IsACop(playerid))
{
    temp = strtok(params, idx);
if(!strlen(temp)) {
SendClientMessage(playerid, COLOR_WHITE, "{168BFF}INFO: {959561} /uncuff {959561}[ID/DioImena] {838361}");
return 1;
}
giveplayerid = ReturnUser(temp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
    if (ProxDetectorS(8.0, playerid, giveplayerid))
{
    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Ne mozes sam sebe osloboditi!"); return 1; }
if(PlayerCuffed[giveplayerid])
{
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Igrac %s ti je skinuo lisice.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Oslobodio si igraca %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GameTextForPlayer(giveplayerid, "~g~Oslobodjen", 2500, 3);
TogglePlayerControllable(giveplayerid, 1);
PlayerCuffed[giveplayerid] = 0;
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Igrac nije cuffovan !");
    return 1;
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije blizu tebe! !");
    return 1;
}
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije online!");
    return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   Nisi policajac / FBI / National Guard /CIA !");
}
}//not connected
return 1;
}


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

pa sto fali?

Kod (System32) [Izaberi]
CMD:cuff(playerid, params[])
{
new string[128], sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME], id;
    if(IsPlayerConnected(playerid))
    {
if(IsACop(playerid))
{
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "Korištenje: /cuff [ID]");
else if(id == INVALID_PLAYER_ID)) return SendClientMessage(playerid, -1, "Pogrešan ID");
        if(IsACop(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "   Ne mozes cuffovati PD/FBI/SWAT/CIA !");
    if(PlayerCuffed[id] > 0) return SendClientMessage(playerid, COLOR_GREY, "   Igracu su vec stavljene lisice !");
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
    new car = GetPlayerVehicleID(playerid);
    if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "Ne mozes sam sebe cuffovati!");
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
    {
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "%s ti je stavio lisice, sve dok ih on ne skine.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Stavio si lisice igracu %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " %s vadi lisice i stavlja ih %s.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~r~Uhvacen", 2500, 3);
TogglePlayerControllable(id, 0);
PlayerCuffed[giveplayerid] = 2;
PlayerCuffedTime[giveplayerid] = 180;
    }
    else SendClientMessage(playerid, COLOR_GREY, "   Igrac nije u vozilu ili ti nisi vozac !");
}
else SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije u tvojoj blizini !");
}
else SendClientMessage(playerid, COLOR_GREY, "   Nisi policajac / FBI / National Guard /CIA !");
}
return 1;
}
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

Citat: System32 poslato Jul 23, 2011, 23:51:07 POSLE PODNE
pa sto fali?

Kod (System32) [Izaberi]
CMD:cuff(playerid, params[])
{
new string[128], sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME], id;
    if(IsPlayerConnected(playerid))
    {
if(IsACop(playerid))
{
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "Korištenje: /cuff [ID]");
else if(id == INVALID_PLAYER_ID)) return SendClientMessage(playerid, -1, "Pogrešan ID");
        if(IsACop(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "   Ne mozes cuffovati PD/FBI/SWAT/CIA !");
    if(PlayerCuffed[id] > 0) return SendClientMessage(playerid, COLOR_GREY, "   Igracu su vec stavljene lisice !");
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
    new car = GetPlayerVehicleID(playerid);
    if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "Ne mozes sam sebe cuffovati!");
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
    {
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
        format(string, sizeof(string), "%s ti je stavio lisice, sve dok ih on ne skine.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Stavio si lisice igracu %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " %s vadi lisice i stavlja ih %s.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~r~Uhvacen", 2500, 3);
TogglePlayerControllable(id, 0);
PlayerCuffed[giveplayerid] = 2;
PlayerCuffedTime[giveplayerid] = 180;
    }
    else SendClientMessage(playerid, COLOR_GREY, "   Igrac nije u vozilu ili ti nisi vozac !");
}
else SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije u tvojoj blizini !");
}
else SendClientMessage(playerid, COLOR_GREY, "   Nisi policajac / FBI / National Guard /CIA !");
}
return 1;
}


Ukucam /cuff pise Nisi policajac PD/FBI/SWAT/CIA

Nisi stavio ciu pod ono IsACop. ?

pa jesi dao sebi lidera od ili nesto od tog
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

Vidi,imaš public IsACop i tu dodaš ID CIA-e

ovako ti izgleda:

umjesto [ID CIA-E],naravno,dodaš id cia-e :D

public IsACop(playerid)
{
if(IsPlayerConnected(playerid))
{
   new leader = PlayerInfo[playerid][pLeader];
   new member = PlayerInfo[playerid][pMember];
   if(member==1 || member==2 || member==3 || member==[ID CIA-E])
{
   return 1;
}
else if(leader==1 || leader==2 || leader==3 || leader==[ID CIA-E])
{
   return 1;
}
}
return 0;
}
Poslednja Izmena: Jul 24, 2011, 01:46:16 PRE PODNE od pHon

Citat: System32 poslato Jul 24, 2011, 01:14:27 PRE PODNE
pa jesi dao sebi lidera od ili nesto od tog

jesam/apostavi lider 0 14 cia je id 14i to i nece opet

pHon ti je napisao gore ti samo stavi id od Cie, i bez onih zagrada
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √