Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: #Badzoni poslato Februar 18, 2017, 21:12:53 POSLE PODNE

Naslov: [POMOC] G u vozilo..
Poruka od: #Badzoni poslato Februar 18, 2017, 21:12:53 POSLE PODNE
Skripta koju koristim: //
Detaljan opis problema: Igrac sa lisicama moze ici G u neko vozilo koje mu je u blizini..
Dio skripte:public OnPlayerEnterVehicle( playerid, vehicleid, ispassenger) {
if( PlayerCuffed[ playerid ] >= 2)
    antiCheatCS[ playerid ][ EnteredVehicle ] = vehicleid;
    if( ispassenger == 1 ) {
if( BusyVehicle[ vehicleid ] > -1 ) {
    if( BusyVehicle[ vehicleid ] == playerid ) { }
else {
        new Float:Poz[ 3 ];
    GetPlayerPos( playerid, Poz[ 0 ], Poz[ 1 ], Poz[ 2 ] );
        Tosic_SetPlayerPos( playerid, Poz[ 0 ], Poz[ 1 ], Poz[ 2 ] );
        SetTimerEx( "SlobodnoSada", 2000, false, "i", playerid );
        SCM( playerid, SVETLOCRVENA, "[SECURITY] Ne mozes to!");
}
}
}
return true;
}[code]
[b]Neke slike/video za lakse dobivanje pomoci(neobavezno)[/b]: //
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: Roby Mapper poslato Februar 18, 2017, 22:45:10 POSLE PODNE
Ehhh imao sam isti problem ne secam se kako sam resio to  :D
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: // xunder poslato Februar 18, 2017, 22:55:07 POSLE PODNE
daj cmd za /cuff /lisice isl.
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: Roby Mapper poslato Februar 19, 2017, 11:24:31 PRE PODNE
Daj nam komadnu /cuff /lisice nije dovrsena sigurno  :-X
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: #Badzoni poslato Februar 19, 2017, 12:08:27 POSLE PODNE
CMD:cuff( playerid, params[] ) {
if( GetFactionType( playerid ) != ORG_TIP_PD ) return GRESKA( playerid, "Niste u mogucnosti koristiti ovu komandu" );
new igrac;
    if( BrojLisica[ playerid ] == 0  ) return GRESKA( playerid, "Nemate nijedan par lisica." );
if( sscanf( params, "u", igrac ) ) return SendUsageMessage( playerid, "/cuff [ ID/Deo imena ]");
if( PoliceDuty[ playerid ] == false ) return GRESKA( playerid, "Da bi koristio ovu komandu moras biti policajac na duznosti!");
    if( IsPlayerConnected( igrac ) ) {
if( igrac != INVALID_PLAYER_ID ) {
    if( OI[ PlayerInfo[ igrac ][ xClan ] ][ oTip ] == ORG_TIP_PD ) return GRESKA( playerid, "Ne mozes staviti lisice na policajca !");
if( IsPlayerNearPlayer(5.0, playerid, igrac )  && !IsPlayerInAnyVehicle( playerid ) && !IsPlayerInAnyVehicle( igrac ) ) {
if( igrac == playerid ) return GRESKA( playerid, "Ne mozes sam sebi stavit lisice!");
if( PlayerCuffed[ igrac ] == 1 ) {
SendClientMessageEx( igrac, SVETLOPLAVA, "* Stavio vam je lisice %s.", ImeIgraca( playerid ) );
    SendClientMessageEx( playerid, SVETLOPLAVA, "* Stavio si lisice na %s.", ImeIgraca( igrac ) );
    format( globalstring, sizeof( globalstring ), "* %s stavlja lisice na %s, tako da mu nebi pobjegao.", ImeIgraca( playerid ), ImeIgraca( igrac ) );
    PorukaRadius( 30.0, playerid, globalstring, LJUBICASTA );
    GameTextForPlayer( igrac, "~r~Uhapsen", 2500, 3);
    TogglePlayerControllable( igrac, 0 );
    SetPlayerAttachedObject( igrac, OBJECT_SLOT_RHAND, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000 );
SetPlayerSpecialAction( igrac, SPECIAL_ACTION_CUFFED );
PlayerCuffed[ igrac ] = 2;
CuffTimer[ playerid ] = SetTimerEx("CuffTajmer", 20000, false, "i", playerid );
// BrojLisica[ playerid ]--;

} else GRESKA( playerid, "Taj igrac nije sokiran !");
} else GRESKA( playerid, "Taj igrac nije blizu vas !");
}
} else GRESKA( playerid, "Taj igrac nije online !");
    return 1;
}
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: // xunder poslato Februar 19, 2017, 19:04:23 POSLE PODNE
if (PlayerCuffed[playerid] == 2) {
ClearAnimations(playerid, 1);
SendClientMessage(playerid, -1, "Ne mozes dok si cuffovan");
}
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: #Badzoni poslato Februar 20, 2017, 11:33:08 PRE PODNE
Dje da dodam to? Kod Cuff ili ovo EnterVehicle?
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: Savana poslato Februar 20, 2017, 13:44:39 POSLE PODNE
pod enter vehicle dodas ,da ako je cuffan da nemoze uci..
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: #Badzoni poslato Februar 21, 2017, 09:36:38 PRE PODNE
Pokusao sam nesto ovako, ne radi...
Dje sam zeznuo?
public OnPlayerEnterVehicle( playerid, vehicleid, ispassenger) {
if( PlayerCuffed[ playerid ] == 2 ) {
    if( !occupied[ vehicleid ] )
occupied[ vehicleid ] = true;
}
    antiCheatCS[ playerid ][ EnteredVehicle ] = vehicleid;
    if( ispassenger == 1 ) {
if( BusyVehicle[ vehicleid ] > -1 ) {
    if( BusyVehicle[ vehicleid ] == playerid ) { }
else {
        new Float:Poz[ 3 ];
    GetPlayerPos( playerid, Poz[ 0 ], Poz[ 1 ], Poz[ 2 ] );
        Tosic_SetPlayerPos( playerid, Poz[ 0 ], Poz[ 1 ], Poz[ 2 ] );
        SetTimerEx( "SlobodnoSada", 2000, false, "i", playerid );
        SCM( playerid, SVETLOCRVENA, "Ne mozes to!");
}
}
}
return true;
}
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: Savana poslato Februar 21, 2017, 10:54:54 PRE PODNE
a jesi ga najebo..

dodas samo

[pawn]if( PlayerCuffed[ playerid ] == 2 )
     return SCM(playerid, -1, "Nemozes s lisicama u auto");[/pawn]
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: B185 poslato Februar 21, 2017, 14:09:10 POSLE PODNE
Ovo dodaj pod OnPlayerEnterVehicle

[pawn]   if(PlayerCuffed[playerid] > 0)
   {
       GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
      SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
      SCM( playerid,  -1, "Ne mozete ulaziti u vozilo dok imate lisice!");
   }[/pawn]
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: #Badzoni poslato Februar 22, 2017, 10:38:15 PRE PODNE
Opet nece..
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: B185 poslato Februar 22, 2017, 15:33:11 POSLE PODNE
Citat: #Badzoni poslato Februar 22, 2017, 10:38:15 PRE PODNE
Opet nece..

Sta ti izlazi kada udjes u vozilo?
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: PROXY poslato Februar 22, 2017, 19:42:32 POSLE PODNE
public OnPlayerEnterVehicle( playerid, vehicleid, ispassenger) {
if(PlayerCuffed[playerid] > 0)
{
    GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
SCM( playerid,  -1, "Ne mozete ulaziti u vozilo dok imate lisice!");
}
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: B185 poslato Februar 22, 2017, 19:49:42 POSLE PODNE
Citat: Mr.Laky poslato Februar 22, 2017, 19:42:32 POSLE PODNE
public OnPlayerEnterVehicle( playerid, vehicleid, ispassenger) {
if(PlayerCuffed[playerid] > 0)
{
    GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
SetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
SCM( playerid,  -1, "Ne mozete ulaziti u vozilo dok imate lisice!");
}


Pa valjda zna da odradi za public, nije toliki bot valjda :D
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: #Badzoni poslato Februar 23, 2017, 09:35:37 PRE PODNE
Stavljao sam tako, ne moze..
Rijesio sam malo drugacije, hvala svima u svakom slucaju. Moze lock...
Naslov: Odg: [POMOC] G u vozilo..
Poruka od: PROXY poslato Februar 23, 2017, 19:40:25 POSLE PODNE
Sto je najgore jeste :D , treba da uskladi taj kod sa svojom skriptom , nije kao sto smo mu mi naveli , zato mu ni ne radi