Szerző Téma: 1 bizonyos pont..  (Megtekintve 784 alkalommal)

1 bizonyos pont..
« Dátum: 2010. október 17. - 17:24:17 »
0 Show voters
Na Ceyajóó :D
Abban kérnék helpet hogy énnekem aztkéne hogy 1 megadott skinü ember 1 megadott koordinátán tudjon csak használni 1 parancsot szal igyképzelném el
Koordináta: XYZ és pl a 343-as skinü ember tudja csak a /fegyverek parancsot használni amivel pl kap 1 mp5 öt+deaglet.
+ Még 1 olyan kérésem lenne hogy egy mozgó objectet ami jelenesetben 1 kapu lenne LSPD-n a garázshoz hogy azt csak a rendõr skinü emberek használhassák ezt a parancsot /pdnyit /pdzar és csak LSPD tõl kb 10m-es körzetben
+1 Megadott skinü kocsiba csak 1 megadott skinü player szálhason ben
elõre is ty

Nem elérhető ZeRo

  • 4620
  • Ex Globális Moderátor
    • Profil megtekintése
1 bizonyos pont..
« Válasz #1 Dátum: 2010. október 17. - 18:01:14 »
0 Show voters
Elsõ:
 

public OnPlayerCommandText( playerid, cmdtext[  ] ) {
    if( strcmp( \"/fegyverek\", cmdtext, true ) == 0 ) {
        if( GetPlayerSkin( playerid ) != 343 ) {
            SendClientMessage( playerid, COLOR_RED, \"Nem használhatod ezt a parancsot!\" );
        } else if( !IsPlayerInRangeOfPoint( playerid, 5.0, X, Y, Z ) ) {
            SendClientMessage( playerid, COLOR_RED, \"Ezt a parancsot itt nem használhatod!\" );
        } else {
            GivePlayerWeapon( playerid, WEAPON_MP5, 100 );
            GivePlayerWeapon( playerid, WEAPON_DEAGLE, 100 );
        }
        return 1;
    }
    return 0;
}

 


Második:
 

public OnPlayerCommandText( playerid, cmdtext[  ] ) {
    if( strcmp( \"/fegyverek\", cmdtext, true ) == 0 ) {
        if( GetPlayerSkin( playerid ) != RENDÕR_SKIN_ID ) {
            SendClientMessage( playerid, COLOR_RED, \"Nem használhatod ezt a parancsot!\" );
        } else if( !IsPlayerInRangeOfPoint( playerid, 20.0, X, Y, Z ) ) {
            SendClientMessage( playerid, COLOR_RED, \"Ezt a parancsot itt nem használhatod!\" );
        } else {
            //...
        }
        return 1;
    }
    return 0;
}

 


Harmadik:
 

public OnPlayerStateChange( playerid, newstate ) {
    if( newstate == PLAYER_STATE_DRIVER ) {
        if( GetVehicleModel( GetPlayerVehicleID( playerid ) ) == X && GetPlayerSkin( playerid ) != Y ) {
            RemovePlayerFromVehicle( playerid );
        }
    }
    return 1;
}

1 bizonyos pont..
« Válasz #2 Dátum: 2010. október 18. - 14:28:16 »
0 Show voters
Köszi de lenne még1 pl azt meglehet csinálni hogy 1 bizonyos skinbõl csak 2-3 legyen a szerón?

Nem elérhető ZeRo

  • 4620
  • Ex Globális Moderátor
    • Profil megtekintése
1 bizonyos pont..
« Válasz #3 Dátum: 2010. október 18. - 14:36:19 »
0 Show voters

public OnPlayerRequestSpawn( playerid ) {
    new skinCounter;
    for( new x = 0; x < MAX_PLAYERS; ++x ) {
        if( !IsPlayerConnected( x ) ) continue;
        if( GetPlayerSkin( x ) == SKIN_ID ) ++skinCounter;
    }
    if( skinCounter == 3 ) {
        SendClientMessage( playerid, COLOR_RED, \"Válassz másik skint!\" );
        return 0;
    }
    return 1;
}

1 bizonyos pont..
« Válasz #4 Dátum: 2010. október 18. - 15:01:16 »
0 Show voters
Kössz

1 bizonyos pont..
« Válasz #5 Dátum: 2010. október 18. - 16:54:16 »
0 Show voters
Témát zárom mert a probléma megoldódott.
Pioneer ha gondod van ezzel kapcsolatban valamivel írj PM-et nekem és megnyitom újra.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal