28.09.2010, 09:42
Im trying to change this code to a command
I got this but it doesnt work
the code is placed under
Код:
if(IsKeyJustDown(KEY_CROUCH, newkeys, oldkeys) ) { if( Player[playerid][PrisonDuration] >= 1 ) { SendClientMessage( playerid, WHITE, "This feature isn't available whilst you're prisoned / jailed." ); } else { if(IsPlayerInRangeOfPoint( playerid, 3, BankIntX, BankIntY, BankIntZ) ) { SetPlayerInterior( playerid, 0 ); TextDrawHideForPlayer( playerid, ExitTextdraw); SetPlayerPos( playerid, BankExtX, BankExtY, BankExtZ); }
Код:
command(enter, playerid, params[]) // <-- Changed that { if( Player[playerid][PrisonDuration] >= 1 ) { SendClientMessage( playerid, WHITE, "This feature isn't available whilst you're prisoned / jailed." ); } else { if(IsPlayerInRangeOfPoint( playerid, 3, BankIntX, BankIntY, BankIntZ) ) { SetPlayerInterior( playerid, 0 ); TextDrawHideForPlayer( playerid, ExitTextdraw); SetPlayerPos( playerid, BankExtX, BankExtY, BankExtZ); }
Код:
public OnPlayerKeyStateChange // <-- Should i place it somewhere else?