[pawn]
CMD:kocsifreeze( playerid, params[ ] ) {
new iPl;
if( sscanf( params, \"u\", iPl ) ) {
SendClientMessage( playerid, 0xFF0000AA, \"Használat: /kocsifreeze [iD]\" );
} else if( GetPVarInt( iPl, \"Freezed\" ) ) {
SendClientMessage( playerid, 0xFF0000AA, \"Már le van fagyasztva!\" );
} else if( !IsPlayerConnected( iPl ) || GetPlayerState( iPl ) != PLAYER_STATE_DRIVER ) {
SendClientMessage( playerid, 0xFF0000AA, \"A játékos nincs csatlakozva, vagy nincs kocsiban!\" );
} else {
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx( GetPlayerVehicleID( iPl ), engine, lights, alarm, doors, bonnet, boot, objective );
SetVehicleParamsEx( GetPlayerVehicleID( iPl ), 0, lights, alarm, doors, bonnet, boot, objective );
SetPVarInt( iPl, \"Freezed\", true );
}
return 1;
}
CMD:kocsiunfreeze( playerid, params[ ] ) {
new iPl;
if( sscanf( params, \"u\", iPl ) ) {
SendClientMessage( playerid, 0xFF0000AA, \"Használat: /kocsifreeze [iD]\" );
} else if( !GetPVarInt( iPl, \"Freezed\" ) ) {
SendClientMessage( playerid, 0xFF0000AA, \"Nincs lefagyasztva!\" );
} else if( !IsPlayerConnected( iPl ) || GetPlayerState( iPl ) != PLAYER_STATE_DRIVER ) {
SendClientMessage( playerid, 0xFF0000AA, \"A játékos nincs csatlakozva, vagy nincs kocsiban!\" );
} else {
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx( GetPlayerVehicleID( iPl ), engine, lights, alarm, doors, bonnet, boot, objective );
SetVehicleParamsEx( GetPlayerVehicleID( iPl ), 1, lights, alarm, doors, bonnet, boot, objective );
SetPVarInt( iPl, \"Freezed\", false );
}
return 1;
}
[/pawn]
Elvileg.