GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Szkript kérések => A témát indította: ObiWan - 2013. Szeptember 15. - 10:19:49

Cím: /goto megakadályozása
Írta: ObiWan - 2013. Szeptember 15. - 10:19:49
Üdv mindenkinek!
Szeretnék egy olyan parancsot csinálni, amivel kitudom kapcsolni azt, hogy egy player hozzám teleportáljon, és vissza is lehessen kapcsolni..
Ez nekem nem ment eddig. Esetleg valaki megtudná nekem csinálni?
Cím: /goto megakadályozása
Írta: .::David::. - 2013. Szeptember 15. - 11:55:17
http://sampforum.hu/index.php?topic=8926.msg102504#msg102504
Cím: /goto megakadályozása
Írta: ObiWan - 2013. Szeptember 15. - 12:18:49
Idézetet írta: $$David$$ date=1379238917\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"42753\" data-ipsquote-contentclass=\"forums_Topic
http://sampforum.hu/index.php?topic=8926.msg102504#msg102504
 
Köszi, ez jó, de nekem szét kellene szedni két külön parancsra a /setgoto parancsot. /gotooff és /gotoon
Cím: /goto megakadályozása
Írta: rcsbakos2 - 2013. Szeptember 17. - 23:24:44
akkor csak cseréld ki ezt:
 
CMD:setgoto ( playerid, params [  ] )
{
    if ( GetPVarInt ( playerid, \"pGoto\" ) == 0  ) {
         SetPVarInt ( playerid, \"pGoto\", 1 );
         SendClientMessage ( playerid, 0x000000FF, \"Engedélyezted, hogy hozzád teleportálhassanak!\" );
    } else {
          SetPVarInt ( playerid, \"pGoto\", 0 );
          SendClientMessage ( playerid, 0x000000FF, \"Letiltottad, hogy hozzád teleportálhassanak!\" );
    }
    return 1;
}

 
erre:
 

CMD:setgoto ( playerid, params [  ] )
{
    if ( GetPVarInt ( playerid, \"pGoto\" ) == 0  ) {
         SetPVarInt ( playerid, \"pGoto\", 1 );
         SendClientMessage ( playerid, 0x000000FF, \"Engedélyezted, hogy hozzád teleportálhassanak!\" );
CMD:parancs ( playerid, params [ ] )
      if ( GetPVarInt ( playerid, \"pGoto\" ) == 0  ) {
          SetPVarInt ( playerid, \"pGoto\", 0 );
          SendClientMessage ( playerid, 0x000000FF, \"Letiltottad, hogy hozzád teleportálhassanak!\" );
    }
    return 1;
}

 
remélem segítettem de csak gondolkodni kellene !::D
Cím: /goto megakadályozása
Írta: Flash - 2013. Szeptember 18. - 17:03:57
Idézetet írta: rcsbakos2 date=1379453084\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"42753\" data-ipsquote-contentclass=\"forums_Topic
akkor csak cseréld ki ezt:
 
CMD:setgoto ( playerid, params [  ] )
{
    if ( GetPVarInt ( playerid, \"pGoto\" ) == 0  ) {
         SetPVarInt ( playerid, \"pGoto\", 1 );
         SendClientMessage ( playerid, 0x000000FF, \"Engedélyezted, hogy hozzád teleportálhassanak!\" );
    } else {
          SetPVarInt ( playerid, \"pGoto\", 0 );
          SendClientMessage ( playerid, 0x000000FF, \"Letiltottad, hogy hozzád teleportálhassanak!\" );
    }
    return 1;
}

 
erre:
 

CMD:setgoto ( playerid, params [  ] )
{
    if ( GetPVarInt ( playerid, \"pGoto\" ) == 0  ) {
         SetPVarInt ( playerid, \"pGoto\", 1 );
         SendClientMessage ( playerid, 0x000000FF, \"Engedélyezted, hogy hozzád teleportálhassanak!\" );
CMD:parancs ( playerid, params [ ] )
      if ( GetPVarInt ( playerid, \"pGoto\" ) == 0  ) {
          SetPVarInt ( playerid, \"pGoto\", 0 );
          SendClientMessage ( playerid, 0x000000FF, \"Letiltottad, hogy hozzád teleportálhassanak!\" );
    }
    return 1;
}

 
remélem segítettem de csak gondolkodni kellene !::D
 
Te is jó szarul írtad le.
tess:
 
CMD:agoto(playerid) {
if(GetPVarInt(playerid, \"agoto\")) {
SetPVarInt(playerid, \"agoto\", 1);
}else{
SetPVarInt(playerid, \"agoto\", 0);
}
new str[128];
format(str, sizeof(str), \"Sikeresen %s a hozzád való teleportálást.\", GetPVarInt(playerid, \"agoto\")?(\"engedélyezted\"):(\"letíltottad\"));
SendClientMessage(playerid, -1, str);
return 1;
}

 
Tíltás sor meg:
 
if(!GetPVarInt(id, \"agoto\")) return SendClientMessage(playerid, -1, \"Hiba. A játékosnak le van tíltva a hozzá való teleportálás.\");
Cím: /goto megakadályozása
Írta: ObiWan - 2013. Szeptember 21. - 08:10:12
Kössz mindenkinek!