niree
Wiek: 28 Na forum: 5312 dni Posty: 22
Nick w MP: nireee_niree
W tym ci co nie co pomog?, ale tylko co nie co
Tutaj masz kod do koguta(tworzy sie obiekt po wpisaniu cmd)
////G?ra
Pawn //-----kogutv2
new posiadaxd [ MAX_PLAYERS ];
new kogut [ MAX_PLAYERS ];
Gdzie? tam;
Pawn
if( strcmp ( cmdtext , "/kogut" , true ) == 0 )
{
if( IsACop ( playerid ) || IsAHA ( playerid ))
{
if( PlayerInfo [ playerid ][ pRank ] < 2 )
{
SendClientMessage ( playerid , COLOR_GREY , "Musisz mie? 2 range aby u?ywa? koguta/nie jeste? policjantem!" );
return 1 ;
}
if ( GetPlayerState ( playerid )!= PLAYER_STATE_DRIVER )
{
return SendClientMessage ( playerid , COLOR_GRAD1 , "Nie jeste? Kierowc?/w poje?dzie." );
}
if( posiadaxd [ playerid ] == 0 )
{
kogut [ playerid ] = CreateObject ( 18646 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 250.0 );
AttachObjectToVehicle ( kogut [ playerid ], GetPlayerVehicleID ( playerid ), 0.0 , 0.0 , 0.9 , 0.0 , 0.0 , 1.5 );
posiadaxd [ playerid ] = 1 ;
GetPlayerName ( playerid , sendername , sizeof ( sendername ));
format ( string , sizeof (string), "%s przyczepia kogut na dach samochodu." , sendername );
}
else
{
SendClientMessage ( playerid , - 1 , "{00CED1}Masz ju? za?o?ony Kogut" );
}
SendClientMessage ( playerid , COLOR_REDD , "OSTRZE?ENIE: Nadmierne Spamowanie Komend? /kogut grozi wydaleniem z frakcji!!" );
ProxDetector ( 30.0 , playerid , string , COLOR_PURPLE , COLOR_PURPLE , COLOR_PURPLE , COLOR_PURPLE , COLOR_PURPLE );
}
return 1 ;
}
if( strcmp ( cmdtext , "/zkogut" , true ) == 0 )
{
if( IsACop ( playerid ) || IsAHA ( playerid ))
{
if( PlayerInfo [ playerid ][ pRank ] < 2 )
{
SendClientMessage ( playerid , COLOR_GREY , "Musisz mie? 2 range/nie jeste? policjantem!" );
return 1 ;
}
if ( GetPlayerState ( playerid )!= PLAYER_STATE_DRIVER )
{
return SendClientMessage ( playerid , COLOR_GRAD1 , "Nie jeste? Kierowc?/w poje?dzie." );
}
if( posiadaxd [ playerid ] == 1 )
{
DestroyObject ( kogut [ playerid ]);
GetPlayerName ( playerid , sendername , sizeof ( sendername ));
format ( string , sizeof (string), "%s zdejmuje kogut z dachu samochodu." , sendername );
SendClientMessage ( playerid , COLOR_REDD , "OSTRZE?ENIE: Nadmierne Spamowanie Komend? /kogut grozi wydaleniem z frakcji!!" );
ProxDetector ( 30.0 , playerid , string , COLOR_PURPLE , COLOR_PURPLE , COLOR_PURPLE , COLOR_PURPLE , COLOR_PURPLE );
posiadaxd [ playerid ] = 0 ;
}
return 1 ;
}
Prosz :-)
xD
Jak widzisz, ID obiektu jest w linijce:
Pawn CreateObject ( 18646 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 250.0 );
A co do wsp??rz?dnych po?o?enia obiektu to w tej linijce ;
Pawn AttachObjectToVehicle ( kogut [ playerid ], GetPlayerVehicleID ( playerid ), 0.0 , 0.0 , 0.9 , 0.0 , 0.0 , 1.5 );
Pozdrawiam.